/* BWCA Cams - Styles */

:root {
    --bg-dark: #0d1117;
    --bg-card: #161b22;
    --bg-card-hover: #1c2128;
    --text-primary: #e6edf3;
    --text-secondary: #8b949e;
    --text-muted: #6e7681;
    --accent: #2f81f7;
    --accent-green: #3fb950;
    --accent-orange: #d29922;
    --border: #30363d;
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 16px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
}

a {
    color: var(--accent);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Hero */
.hero {
    position: relative;
    padding: 6rem 2rem 4rem;
    text-align: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background: 
        linear-gradient(to bottom, rgba(13, 17, 23, 0.3), var(--bg-dark)),
        url('https://images.unsplash.com/photo-1506905925346-21bda4d32df4?w=1920&q=80') center/cover;
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
}

.hero h1 {
    font-size: clamp(2.5rem, 8vw, 4rem);
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 20px rgba(0,0,0,0.5);
}

.tagline {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.ice-status {
    display: inline-block;
    background: rgba(47, 129, 247, 0.1);
    border: 1px solid var(--accent);
    border-radius: var(--radius-md);
    padding: 1rem 2rem;
}

.status-badge {
    display: inline-block;
    background: var(--accent);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.ice-status p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin: 0;
}

/* Navigation */
.region-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem;
    background: rgba(13, 17, 23, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
}

.region-nav a {
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-weight: 500;
    transition: all 0.2s;
}

.region-nav a:hover {
    background: var(--bg-card);
    color: var(--text-primary);
    text-decoration: none;
}

/* Main Content */
main {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Region Sections */
.region-section {
    padding: 3rem 0;
}

.region-header {
    text-align: center;
    margin-bottom: 2rem;
}

.region-header h2 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.region-header p {
    color: var(--text-secondary);
}

/* Camera Grid */
.cams-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
}

/* Camera Cards */
.cam-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.cam-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}

.cam-card.featured {
    border-color: var(--accent);
}

.cam-card.wide {
    grid-column: span 2;
}

@media (max-width: 768px) {
    .cam-card.wide {
        grid-column: span 1;
    }
}

.cam-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
    gap: 0.5rem;
    flex-wrap: wrap;
}

.cam-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
}

.cam-badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    background: var(--bg-dark);
    color: var(--text-secondary);
    white-space: nowrap;
}

.cam-badge.live {
    background: rgba(63, 185, 80, 0.15);
    color: var(--accent-green);
}

/* Camera Embeds */
.cam-embed {
    position: relative;
    aspect-ratio: 16/9;
    background: var(--bg-dark);
    overflow: hidden;
}

.cam-embed.wide {
    aspect-ratio: 21/9;
}

.cam-embed iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.webcam-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cam-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
}

.placeholder-content {
    text-align: center;
    color: var(--text-muted);
}

.placeholder-content span {
    font-size: 3rem;
    display: block;
    margin-bottom: 0.5rem;
}

.placeholder-content p {
    font-size: 0.9rem;
}

/* Camera Info */
.cam-info {
    padding: 1.25rem;
}

.cam-info p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.cam-link {
    display: inline-flex;
    align-items: center;
    font-weight: 500;
    font-size: 0.9rem;
}

/* About Section */
.about-section {
    padding: 4rem 0;
    border-top: 1px solid var(--border);
}

.about-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 1rem;
}

.about-content > h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 1rem;
}

.about-content > p {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

/* Ice Info Grid */
.ice-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.ice-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    text-align: center;
}

.ice-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.ice-card .date-range {
    color: var(--accent);
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
}

.ice-card p:last-child {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0;
}

/* Ice Tips */
.ice-tips {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 2rem;
    margin-bottom: 2rem;
}

.ice-tips h3 {
    margin-bottom: 1rem;
}

.ice-tips ul {
    list-style: none;
    display: grid;
    gap: 0.75rem;
}

.ice-tips li {
    color: var(--text-secondary);
    padding-left: 1.5rem;
    position: relative;
}

.ice-tips li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--accent);
}

.ice-tips li strong {
    color: var(--text-primary);
}

/* Resources */
.resources {
    text-align: center;
}

.resources h3 {
    margin-bottom: 1rem;
}

.resource-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.resource-links a {
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-sm);
    transition: all 0.2s;
}

.resource-links a:hover {
    background: var(--bg-card-hover);
    text-decoration: none;
    border-color: var(--accent);
}

/* Footer */
footer {
    border-top: 1px solid var(--border);
    padding: 3rem 2rem;
    text-align: center;
    margin-top: 3rem;
}

.footer-content p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.footer-links {
    margin-top: 1rem;
}

.footer-links a {
    color: var(--text-secondary);
}

/* Responsive */
@media (max-width: 600px) {
    .hero {
        padding: 4rem 1rem 3rem;
    }
    
    .cams-grid {
        grid-template-columns: 1fr;
    }
    
    .region-nav {
        gap: 0.25rem;
    }
    
    .region-nav a {
        padding: 0.4rem 0.75rem;
        font-size: 0.9rem;
    }
    
    .ice-status {
        padding: 0.75rem 1rem;
    }
}

/* Loading states */
.webcam-img.loading {
    opacity: 0.5;
}

.webcam-img.error {
    opacity: 0.3;
}

/* Refresh indicator */
.cam-card[data-refreshing] .cam-badge.live::after {
    content: ' ⟳';
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
