/* Chess Elegante - Shared Styles */

/* ============================================
   GLOBAL STYLES
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Didot', 'Bodoni MT', 'Playfair Display', serif;
    background: #FFFFFF;
    color: #1a1a1a;
    line-height: 1.6;
}

/* ============================================
   NAVIGATION
   ============================================ */
.main-nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: #1a1a1a;
    z-index: 1000;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 56px;
}

.logo {
    font-size: 18px;
    font-weight: 300;
    letter-spacing: 3px;
    color: white;
}

.logo span {
    font-weight: 400;
}

.logo a {
    text-decoration: none;
    color: inherit;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.desktop-nav {
    display: none;
}

.nav-links a {
    text-decoration: none;
    color: #d4d4d4;
    font-size: 13px;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-family: 'Helvetica Neue', sans-serif;
    font-weight: 300;
    transition: color 0.2s;
}

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

.nav-links a.active {
    color: #fbbf24;
    border-bottom: 1px solid #fbbf24;
    padding-bottom: 4px;
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: block;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 0.5rem;
    margin-right: -0.5rem;
}

.menu-icon {
    width: 24px;
    height: 24px;
}

.mobile-menu-btn.active .hamburger {
    display: none;
}

.mobile-menu-btn.active .close {
    display: block !important;
}

/* Mobile Dropdown */
.mobile-nav-dropdown {
    display: none;
    background: #292929;
    border-top: 1px solid #404040;
}

.mobile-nav-dropdown.active {
    display: block;
}

.mobile-nav-content {
    padding: 0.5rem 1rem;
}

.mobile-nav-content a {
    display: block;
    padding: 0.75rem 0;
    color: #d4d4d4;
    text-decoration: none;
    font-size: 13px;
    letter-spacing: 1.5px;
    font-family: 'Helvetica Neue', sans-serif;
}

.mobile-nav-content a.active {
    color: #fbbf24;
}

.mobile-nav-content a.text-muted {
    color: #999;
}

.mobile-nav-divider {
    border-top: 1px solid #404040;
    margin: 0.5rem 0;
    padding-top: 0.5rem;
}

/* Desktop Navigation */
@media (min-width: 768px) {
    .nav-container {
        height: 64px;
        padding: 0 60px;
    }

    .logo {
        font-size: 20px;
    }

    .desktop-nav {
        display: flex;
    }

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

    .mobile-nav-dropdown {
        display: none !important;
    }
}

.game-controls-menu {
    display: flex;
    gap: 15px;
    align-items: center;
}

.btn-nav {
    padding: 10px 20px;
    font-size: 11px;
    border: 1px solid #1a1a1a;
    background: white;
    color: #1a1a1a;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 300;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    font-family: 'Helvetica Neue', sans-serif;
}

.btn-nav:hover {
    background: #1a1a1a;
    color: white;
}

.btn-danger-nav {
    background: #1a1a1a;
    color: white;
}

.btn-danger-nav:hover {
    background: #333;
    border-color: #333;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    padding: 15px 40px;
    font-size: 12px;
    border: 1px solid #1a1a1a;
    background: #1a1a1a;
    color: white;
    cursor: pointer;
    transition: all 0.3s;
    margin: 8px;
    font-weight: 300;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-family: 'Helvetica Neue', sans-serif;
}

.btn:hover {
    background: white;
    color: #1a1a1a;
}

.btn-primary {
    background: #1a1a1a;
    color: white;
}

.btn-primary:hover {
    background: white;
    color: #1a1a1a;
}

.btn-success {
    background: #1a1a1a;
    color: white;
}

.btn-success:hover {
    background: white;
    color: #1a1a1a;
}

.btn-secondary {
    background: white;
    color: #1a1a1a;
    border: 1px solid #1a1a1a;
}

.btn-secondary:hover {
    background: #1a1a1a;
    color: white;
}

.btn-danger {
    background: #1a1a1a;
    color: white;
    border: 1px solid #1a1a1a;
}

.btn-danger:hover {
    background: #333;
}

.cta-button {
    display: inline-block;
    padding: 18px 50px;
    background: #1a1a1a;
    color: white;
    text-decoration: none;
    font-size: 12px;
    letter-spacing: 3px;
    text-transform: uppercase;
    font-family: 'Helvetica Neue', sans-serif;
    transition: background 0.3s;
    border: 1px solid #1a1a1a;
}

.cta-button:hover {
    background: white;
    color: #1a1a1a;
}

/* ============================================
   FOOTER
   ============================================ */
footer {
    background: white;
    padding: 60px;
    border-top: 1px solid #e8e8e8;
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-links {
    display: flex;
    gap: 40px;
    list-style: none;
}

.footer-links a {
    text-decoration: none;
    color: #666;
    font-size: 12px;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-family: 'Helvetica Neue', sans-serif;
    font-weight: 300;
}

.copyright {
    font-size: 12px;
    color: #999;
    font-family: 'Helvetica Neue', sans-serif;
    font-weight: 300;
}

/* ============================================
   SECTION TITLES
   ============================================ */
.section-title {
    font-size: 14px;
    letter-spacing: 3px;
    text-transform: uppercase;
    font-family: 'Helvetica Neue', sans-serif;
    margin-bottom: 60px;
    font-weight: 300;
    text-align: center;
}

/* ============================================
   MOVE HISTORY COMPONENTS (SHARED)
   ============================================ */
.move-list {
    max-height: 500px;
    overflow-y: auto;
    padding: 0;
}

.move-pair {
    display: grid;
    grid-template-columns: 50px 1fr 1fr;
    gap: 10px;
    padding: 0;
    margin-bottom: 8px;
    align-items: stretch;
}

.move-number {
    font-weight: 300;
    color: #999;
    text-align: right;
    font-size: 14px;
    font-family: 'Courier New', monospace;
    padding: 10px 15px;
    background: #f5f5f5;
    border: 1px solid #e8e8e8;
    display: flex;
    align-items: center;
    justify-content: center;
}

.move-san {
    padding: 10px 15px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 16px;
    text-align: center;
    background: white;
    color: #1a1a1a;
    border: 1px solid #e8e8e8;
    font-family: 'Courier New', monospace;
    display: flex;
    align-items: center;
    justify-content: center;
}

.move-san:hover {
    background: #f5f5f5;
}

.move-san.active-move {
    background: #1a1a1a;
    color: white;
    border-color: #1a1a1a;
}

/* Scrollbar Styling for Move List */
.move-list::-webkit-scrollbar {
    width: 6px;
}

.move-list::-webkit-scrollbar-track {
    background: #f5f5f5;
}

.move-list::-webkit-scrollbar-thumb {
    background: #d0d0d0;
}

.move-list::-webkit-scrollbar-thumb:hover {
    background: #999;
}

/* ============================================
   RESPONSIVE UTILITIES
   ============================================ */
@media (max-width: 968px) {
    .nav-container {
        padding: 0 30px;
    }

    .nav-links {
        gap: 30px;
    }

    .nav-links a {
        font-size: 11px;
    }
}

@media (max-width: 768px) {
    nav {
        padding: 15px 0;
    }

    .nav-container {
        padding: 0 15px;
    }

    .logo {
        font-size: 18px;
        letter-spacing: 2px;
    }

    .nav-links {
        gap: 15px;
    }

    .nav-links a {
        font-size: 10px;
        letter-spacing: 1.5px;
    }

    .game-controls-menu {
        gap: 8px;
    }

    .btn-nav {
        padding: 8px 12px;
        font-size: 9px;
    }

    .main-content {
        padding: 20px 15px;
    }

    .game-section {
        gap: 20px;
    }

    footer {
        padding: 40px 20px;
    }

    .footer-container {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }

    .footer-links {
        gap: 20px;
    }
}

@media (max-width: 480px) {
    .nav-container {
        padding: 0 10px;
    }

    .logo {
        font-size: 16px;
    }

    .nav-links {
        gap: 10px;
    }

    .nav-links a {
        font-size: 9px;
    }

    .btn-nav {
        padding: 6px 10px;
        font-size: 8px;
    }

    .main-content {
        padding: 15px 10px;
    }

    footer {
        padding: 30px 15px;
    }
}
