/* ==========================================
   Chess Board Australia - Styles
   Modern, Clean UI with Great UX
   ========================================== */

/* CSS Variables */
:root {
    --primary: #1a1a2e;
    --primary-light: #16213e;
    --accent: #e94560;
    --accent-hover: #ff6b6b;
    --gold: #d4af37;
    --gold-light: #f4d03f;
    --text: #333;
    --text-light: #666;
    --text-muted: #999;
    --bg: #ffffff;
    --bg-alt: #f8f9fa;
    --bg-dark: #0f0f23;
    --border: #e0e0e0;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.15);
    --radius: 12px;
    --radius-sm: 8px;
    --transition: all 0.3s ease;
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 700;
    line-height: 1.2;
    color: var(--primary);
}

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

a:hover {
    color: var(--accent-hover);
}

img {
    max-width: 100%;
    height: auto;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn-primary {
    background: var(--accent);
    color: white;
}

.btn-primary:hover {
    background: var(--accent-hover);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-secondary {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-secondary:hover {
    background: var(--primary);
    color: white;
}

.btn-gold {
    background: linear-gradient(135deg, var(--gold), var(--gold-light));
    color: var(--primary);
}

.btn-gold:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-sm {
    padding: 10px 20px;
    font-size: 0.875rem;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.logo:hover {
    color: var(--primary);
}

.logo-icon {
    font-size: 2rem;
    color: var(--gold);
}

.logo-text {
    font-family: 'Playfair Display', serif;
}

.logo-au {
    color: var(--accent);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 32px;
}

.nav-links a {
    color: var(--text);
    font-weight: 500;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: var(--transition);
}

.nav-links a:hover::after {
    width: 100%;
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.mobile-menu-btn span {
    display: block;
    width: 25px;
    height: 2px;
    background: var(--primary);
    transition: var(--transition);
}

/* Hero Section */
.hero {
    padding: 140px 0 80px;
    background: linear-gradient(135deg, var(--bg) 0%, var(--bg-alt) 100%);
    overflow: hidden;
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-content p {
    font-size: 1.25rem;
    color: var(--text-light);
    margin-bottom: 32px;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    margin-bottom: 48px;
}

.hero-stats {
    display: flex;
    gap: 40px;
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--gold);
    font-family: 'Playfair Display', serif;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.chess-board-visual {
    width: 400px;
    height: 400px;
    position: relative;
}

.board-3d {
    width: 100%;
    height: 100%;
    background:
        repeating-conic-gradient(
            var(--primary) 0% 25%,
            var(--bg-alt) 0% 50%
        )
        50% / 50px 50px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    transform: perspective(1000px) rotateX(15deg) rotateY(-15deg);
    border: 8px solid var(--gold);
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: perspective(1000px) rotateX(15deg) rotateY(-15deg) translateY(0); }
    50% { transform: perspective(1000px) rotateX(15deg) rotateY(-15deg) translateY(-20px); }
}

/* Section Headers */
.section-header {
    text-align: center;
    margin-bottom: 48px;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 12px;
}

.section-header p {
    font-size: 1.125rem;
    color: var(--text-light);
}

/* Products Section */
.products-section {
    padding: 80px 0;
}

.products-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    flex-wrap: wrap;
    gap: 16px;
}

.filter-group {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 20px;
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text);
    cursor: pointer;
    transition: var(--transition);
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.view-toggle {
    display: flex;
    gap: 4px;
    background: var(--bg-alt);
    padding: 4px;
    border-radius: var(--radius-sm);
}

.view-btn {
    padding: 8px 12px;
    background: transparent;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    color: var(--text-muted);
    transition: var(--transition);
}

.view-btn:hover,
.view-btn.active {
    background: white;
    color: var(--primary);
    box-shadow: var(--shadow);
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.product-card {
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    position: relative;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.product-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    padding: 6px 12px;
    background: var(--accent);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 50px;
    z-index: 1;
}

.product-badge.bestseller {
    background: var(--gold);
    color: var(--primary);
}

.product-image {
    height: 200px;
    background: var(--bg-alt);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: var(--primary);
}

.product-content {
    padding: 20px;
}

.product-category {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--accent);
    margin-bottom: 8px;
}

.product-title {
    font-size: 1.125rem;
    margin-bottom: 8px;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.stars {
    color: var(--gold);
}

.rating-count {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.product-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 16px;
}

.product-features {
    list-style: none;
    margin-bottom: 16px;
}

.product-features li {
    font-size: 0.875rem;
    color: var(--text-light);
    padding: 4px 0;
    padding-left: 20px;
    position: relative;
}

.product-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--gold);
}

.product-actions {
    display: flex;
    gap: 8px;
}

.product-actions .btn {
    flex: 1;
}

.compare-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    background: var(--bg-alt);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.875rem;
}

.compare-checkbox input {
    width: 18px;
    height: 18px;
    accent-color: var(--accent);
}

/* Products Table */
.products-table-wrapper {
    overflow-x: auto;
}

.products-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.products-table th,
.products-table td {
    padding: 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.products-table th {
    background: var(--primary);
    color: white;
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.products-table tr:hover {
    background: var(--bg-alt);
}

.products-table .product-name {
    font-weight: 600;
    color: var(--primary);
}

.products-table .btn {
    white-space: nowrap;
}

.hidden {
    display: none !important;
}

/* Quiz Section */
.quiz-section {
    padding: 80px 0;
    background: var(--bg-alt);
}

.quiz-container {
    max-width: 700px;
    margin: 0 auto;
    background: white;
    border-radius: var(--radius);
    padding: 40px;
    box-shadow: var(--shadow-lg);
}

.quiz-progress {
    margin-bottom: 32px;
}

.progress-bar {
    height: 8px;
    background: var(--bg-alt);
    border-radius: 50px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--gold));
    border-radius: 50px;
    transition: width 0.5s ease;
    width: 20%;
}

.progress-text {
    display: block;
    text-align: center;
    margin-top: 8px;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.quiz-question {
    text-align: center;
    margin-bottom: 32px;
}

.quiz-question h3 {
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.quiz-question p {
    color: var(--text-light);
}

.quiz-options {
    display: grid;
    gap: 12px;
}

.quiz-option {
    padding: 20px;
    background: var(--bg-alt);
    border: 2px solid transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    text-align: left;
}

.quiz-option:hover {
    border-color: var(--accent);
    background: white;
}

.quiz-option.selected {
    border-color: var(--accent);
    background: rgba(233, 69, 96, 0.1);
}

.quiz-option h4 {
    font-size: 1rem;
    margin-bottom: 4px;
    font-family: 'Inter', sans-serif;
}

.quiz-option p {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin: 0;
}

.quiz-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 32px;
}

.quiz-result {
    text-align: center;
}

.result-icon {
    font-size: 4rem;
    color: var(--gold);
    margin-bottom: 16px;
}

.quiz-result h3 {
    font-size: 1.75rem;
    margin-bottom: 24px;
}

.result-product {
    background: var(--bg-alt);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 24px;
}

.result-product .product-title {
    font-size: 1.25rem;
    margin-bottom: 8px;
}

.result-product .product-reason {
    color: var(--text-light);
    margin-bottom: 16px;
}

/* Compare Section */
.compare-section {
    padding: 80px 0;
}

.compare-slots {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 40px;
}

.compare-slot {
    min-height: 200px;
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.compare-slot:hover {
    border-color: var(--accent);
}

.compare-slot.filled {
    border-style: solid;
    border-color: var(--primary);
    background: white;
    box-shadow: var(--shadow);
}

.add-compare-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    transition: var(--transition);
}

.add-compare-btn:hover {
    color: var(--accent);
}

.plus-icon {
    width: 50px;
    height: 50px;
    border: 2px solid currentColor;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.compare-slot-content {
    padding: 20px;
    text-align: center;
    width: 100%;
}

.compare-slot-content .product-icon {
    font-size: 3rem;
    margin-bottom: 12px;
}

.compare-slot-content .product-title {
    font-size: 1rem;
    margin-bottom: 8px;
}

.compare-slot-content .remove-btn {
    background: var(--accent);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    cursor: pointer;
    margin-top: 12px;
}

.compare-table-wrapper {
    overflow-x: auto;
}

.compare-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.compare-table th,
.compare-table td {
    padding: 16px;
    text-align: center;
    border-bottom: 1px solid var(--border);
}

.compare-table th {
    background: var(--primary);
    color: white;
}

.compare-table th:first-child,
.compare-table td:first-child {
    text-align: left;
    font-weight: 600;
    background: var(--bg-alt);
}

.compare-table tr:last-child td {
    border-bottom: none;
}

.compare-check {
    color: var(--gold);
    font-size: 1.25rem;
}

.compare-cross {
    color: var(--text-muted);
}

/* Guide Section */
.guide-section {
    padding: 80px 0;
    background: var(--bg-alt);
}

.guide-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
}

.guide-card {
    background: white;
    padding: 32px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.guide-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.guide-icon {
    font-size: 2.5rem;
    color: var(--gold);
    margin-bottom: 16px;
}

.guide-card h3 {
    font-size: 1.25rem;
    margin-bottom: 12px;
    font-family: 'Inter', sans-serif;
}

.guide-card p {
    color: var(--text-light);
    font-size: 0.9375rem;
}

/* SEO Section */
.seo-section {
    padding: 80px 0;
    background: white;
}

.seo-content {
    max-width: 800px;
    margin: 0 auto;
}

.seo-content h2 {
    font-size: 2rem;
    margin-bottom: 24px;
    text-align: center;
}

.seo-content h3 {
    font-size: 1.25rem;
    margin-top: 32px;
    margin-bottom: 12px;
}

.seo-content p {
    color: var(--text-light);
    margin-bottom: 16px;
    line-height: 1.8;
}

.seo-content strong {
    color: var(--text);
}

/* Footer */
.footer {
    background: var(--bg-dark);
    color: white;
    padding: 60px 0 30px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-brand p {
    color: rgba(255, 255, 255, 0.7);
    margin-top: 16px;
    font-size: 0.9375rem;
}

.footer-brand .logo {
    color: white;
}

.footer-links h4 {
    color: white;
    font-size: 1rem;
    margin-bottom: 20px;
    font-family: 'Inter', sans-serif;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9375rem;
}

.footer-links a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 30px;
    text-align: center;
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.875rem;
    margin-bottom: 8px;
}

.affiliate-disclosure {
    font-size: 0.75rem !important;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    background: white;
    border-radius: var(--radius);
    padding: 32px;
    max-width: 600px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
    transition: var(--transition);
}

.modal-close:hover {
    color: var(--accent);
}

.modal-content h3 {
    margin-bottom: 24px;
}

.modal-product-list {
    display: grid;
    gap: 12px;
}

.modal-product-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: var(--bg-alt);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
}

.modal-product-item:hover {
    border-color: var(--accent);
    background: white;
}

.modal-product-item .product-icon {
    font-size: 2rem;
}

.modal-product-item .product-info h4 {
    font-size: 1rem;
    margin-bottom: 4px;
    font-family: 'Inter', sans-serif;
}

.modal-product-item .product-info p {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin: 0;
}

/* Responsive Design */
@media (max-width: 992px) {
    .hero .container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .hero-buttons {
        justify-content: center;
    }

    .hero-stats {
        justify-content: center;
    }

    .hero-image {
        display: none;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }

    .compare-slots {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 70px;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 20px;
        gap: 0;
        box-shadow: var(--shadow);
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links li {
        padding: 12px 0;
        border-bottom: 1px solid var(--border);
    }

    .mobile-menu-btn {
        display: flex;
    }

    .hero {
        padding: 120px 0 60px;
    }

    .hero-content h1 {
        font-size: 2rem;
    }

    .section-header h2 {
        font-size: 1.75rem;
    }

    .products-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-group {
        justify-content: center;
    }

    .view-toggle {
        justify-content: center;
    }

    .quiz-container {
        padding: 24px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-brand {
        margin-bottom: 20px;
    }

    .products-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .hero-buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .hero-stats {
        flex-direction: column;
        gap: 20px;
    }
}
