/* GridSpy Main Stylesheet - Homepage, About, How to Play, Archive */

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

body {
    font-family: 'Avenir Next', 'Avenir', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.5;
    color: #2a2a2a;
    background: #f5f1e8;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.content-wrapper {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    align-items: start;
}

/* Top Ad - Mobile/Tablet only */
.ad-top {
    max-width: 728px;
    height: 90px;
    margin: 15px auto 10px;
    background: #fff;
    border: 1px solid #e0d8c5;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 12px;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

/* Sidebar Ads - Desktop only */
.ad-sidebar {
    width: 160px;
    height: 600px;
    background: #fff;
    border: 1px solid #e0d8c5;
    position: sticky;
    top: 20px;
    display: none;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 11px;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

/* Bottom Ad */
.ad-bottom {
    max-width: 728px;
    height: 90px;
    margin: 0 auto 20px;
    background: #fff;
    border: 1px solid #e0d8c5;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 12px;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

header {
    text-align: center;
    padding: 10px 15px 5px;
}

.logo {
    font-size: 2.8em;
    font-weight: 600;
    margin-bottom: 5px;
    letter-spacing: -0.5px;
    font-family: 'Avenir Next', 'Avenir', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: #1a1a1a;
}

.tagline {
    font-size: 1.1em;
    color: #5a5a5a;
    font-family: 'Avenir Next', 'Avenir', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

main {
    background: #fff;
    border: 2px solid #d4c5a9;
    border-radius: 8px;
    padding: 30px 25px 25px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    margin-bottom: 20px;
}

.hero {
    text-align: center;
    margin-bottom: 25px;
}

h1 {
    font-size: 2em;
    color: #1a1a1a;
    margin-bottom: 10px;
    font-weight: 600;
    font-family: 'Avenir Next', 'Avenir', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

h2 {
    color: #1a1a1a;
    font-weight: 600;
    font-family: 'Avenir Next', 'Avenir', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

h3 {
    font-family: 'Avenir Next', 'Avenir', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.subtitle {
    font-size: 1.05em;
    color: #5a5a5a;
    margin-bottom: 18px;
    font-family: 'Avenir Next', 'Avenir', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.today-theme {
    background: #e3f0ff;
    border: 2px solid #6b9bd1;
    color: #1a5a8a;
    padding: 10px 25px;
    border-radius: 6px;
    display: inline-block;
    margin-bottom: 18px;
    font-size: 1em;
    font-weight: 600;
    font-family: 'Avenir Next', 'Avenir', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.cta-button {
    background: #5fa76f;
    border: 2px solid #5fa76f;
    color: #fff;
    padding: 14px 45px;
    font-size: 1.25em;
    font-weight: 700;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: all 0.2s ease;
    box-shadow: 0 3px 10px rgba(95, 167, 111, 0.3);
    font-family: 'Avenir Next', 'Avenir', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.cta-button:hover {
    background: #4d8c5c;
    border-color: #4d8c5c;
    transform: translateY(-2px);
    box-shadow: 0 5px 14px rgba(95, 167, 111, 0.4);
}

.features {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 25px;
}

.feature {
    text-align: center;
    padding: 18px 10px;
    background: #fdfcfa;
    border: 1px solid #e0d8c5;
    border-radius: 6px;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.feature:hover {
    background: #fff;
    border-color: #c9c1b0;
    transform: translateY(-2px);
}

.feature-icon {
    display: none;
}

.feature h3 {
    color: #1a1a1a;
    margin-bottom: 5px;
    font-size: 1em;
    font-weight: 600;
    font-family: 'Avenir Next', 'Avenir', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.feature h3::before {
    content: attr(data-emoji);
    font-size: 1.3em;
}

.feature p {
    color: #5a5a5a;
    font-size: 0.85em;
    font-family: 'Avenir Next', 'Avenir', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.3;
}

.themes {
    margin-bottom: 15px;
}

.themes h2 {
    color: #1a1a1a;
    text-align: center;
    margin-bottom: 12px;
    font-size: 1.3em;
    font-weight: 600;
    font-family: 'Avenir Next', 'Avenir', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.themes-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
}

.theme-badge {
    background: #fff;
    border: 2px solid #d4c5a9;
    color: #2a2a2a;
    padding: 10px 6px;
    border-radius: 6px;
    text-align: center;
    font-weight: 600;
    font-size: 0.85em;
    transition: all 0.2s;
    font-family: 'Avenir Next', 'Avenir', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.theme-badge:hover {
    background: #fdfcfa;
    border-color: #a89775;
    transform: translateY(-1px);
}

.nav-links {
    text-align: center;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e0d8c5;
}

.nav-links a {
    color: #5a5a5a;
    text-decoration: none;
    margin: 0 12px;
    font-size: 0.9em;
    font-family: 'Avenir Next', 'Avenir', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: #1a5a8a;
    text-decoration: underline;
}

footer {
    text-align: center;
    padding: 20px;
    color: #6a6a6a;
    font-size: 0.85em;
    font-family: 'Avenir Next', 'Avenir', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* Desktop with sidebar ads */
@media (min-width: 1200px) {
    .container {
        max-width: 1400px;
    }
    
    .content-wrapper {
        grid-template-columns: 160px 1fr 160px;
    }
    
    .ad-sidebar {
        display: flex;
    }
    
    .ad-top {
        display: none;
    }
    
    .ad-bottom {
        display: none;
    }
}

/* Tablet */
@media (max-width: 899px) {
    .logo {
        font-size: 2.2em;
    }
    
    h1 {
        font-size: 1.7em;
    }
    
    .features {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .themes-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .ad-top,
    .ad-bottom {
        max-width: 468px;
        height: 60px;
    }
}

/* Mobile */
@media (max-width: 599px) {
    header {
        padding: 20px 10px 15px;
    }
    
    .logo {
        font-size: 1.9em;
    }
    
    .tagline {
        font-size: 1em;
    }
    
    h1 {
        font-size: 1.5em;
    }
    
    .subtitle {
        font-size: 0.95em;
    }
    
    main {
        padding: 20px 15px;
    }
    
    .today-theme {
        font-size: 0.9em;
        padding: 8px 20px;
    }
    
    .cta-button {
        padding: 12px 35px;
        font-size: 1.1em;
        width: 100%;
        max-width: 280px;
    }
    
    .features {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .themes-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    
    .theme-badge {
        font-size: 0.8em;
        padding: 8px 5px;
    }
    
    .nav-links a {
        display: inline-block;
        margin: 5px 8px;
    }
    
    .ad-top,
    .ad-bottom {
        max-width: 320px;
        height: 50px;
    }
}

/* Logo Image Styles */
.logo-image {
    max-width: 400px;
    width: 100%;
    height: auto;
    margin: 0 auto;
    display: block;
}

@media (max-width: 899px) {
    .logo-image {
        max-width: 300px;
    }
}

@media (max-width: 599px) {
    .logo-image {
        max-width: 250px;
    }
}

/* Archive Page Styles */
.filter-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 25px 0;
    padding-bottom: 15px;
    border-bottom: 1px solid #e0d8c5;
}

.filter-tab {
    padding: 8px 16px;
    border-radius: 20px;
    background: #f5f1e8;
    border: 1px solid #d4c5a9;
    color: #5a5a5a;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-tab:hover {
    background: #fff;
    border-color: #b8a888;
}

.filter-tab.active {
    background: #6b9bd1;
    border-color: #6b9bd1;
    color: #fff;
    font-weight: 600;
}

.puzzle-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.puzzle-card {
    background: #fff;
    border: 2px solid #d4c5a9;
    border-radius: 12px;
    padding: 20px;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
}

.puzzle-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.12);
    border-color: #6b9bd1;
}

.puzzle-date {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
    font-family: 'Avenir Next', 'Avenir', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.puzzle-theme {
    font-size: 15px;
    color: #6b9bd1;
    font-weight: 600;
}

.puzzle-day {
    font-size: 13px;
    color: #8a7960;
    font-weight: 500;
}

.badge-today {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #5fa76f;
    color: #fff;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #8a7960;
}

.empty-state p {
    margin: 8px 0;
    font-size: 16px;
}

.load-more {
    text-align: center;
    margin: 40px 0;
}

.load-more-btn {
    padding: 12px 32px;
    background: #6b9bd1;
    border: 2px solid #6b9bd1;
    color: #fff;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.load-more-btn:hover {
    background: #5a8ab8;
    border-color: #5a8ab8;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(107, 155, 209, 0.3);
}

@media (max-width: 899px) {
    .puzzle-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 16px;
    }
    
    .filter-tabs {
        gap: 6px;
    }
    
    .filter-tab {
        font-size: 13px;
        padding: 6px 12px;
    }
}

@media (max-width: 599px) {
    .puzzle-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}
