/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Dark theme (default) */
    --primary-color: #8B4513;  /* Saddle Brown */
    --primary-dark: #654321;   /* Dark Brown */
    --dark-bg: #2C1810;        /* Dark Chocolate */
    --light-bg: #D2B48C;       /* Tan */
    --accent-bg: #A0522D;      /* Sienna */
    --text-light: #F5DEB3;     /* Wheat */
    --text-dim: rgba(245, 222, 179, 0.7);
    --glass-bg: rgba(139, 69, 19, 0.1);
    --glass-border: rgba(210, 180, 140, 0.2);
}

[data-theme="light"] {
    --primary-color: #A0522D;  /* Sienna */
    --primary-dark: #8B4513;   /* Saddle Brown */
    --dark-bg: #F5DEB3;        /* Wheat */
    --light-bg: #DEB887;       /* Burlywood */
    --accent-bg: #D2691E;      /* Chocolate */
    --text-light: #2C1810;     /* Dark Chocolate */
    --text-dim: rgba(44, 24, 16, 0.7);
    --glass-bg: rgba(222, 184, 135, 0.1);
    --glass-border: rgba(139, 69, 19, 0.2);
}

body {
    font-family: 'Arial', sans-serif;
    background: var(--dark-bg);
    color: var(--text-light);
    min-height: 100vh;
    overflow-x: hidden;
}

.chess-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--dark-bg);
    z-index: -1;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.animated-board {
    position: absolute;
    width: 100vmin;
    height: 100vmin;
    max-width: 800px;
    max-height: 800px;
    transform: rotate(45deg) scale(1.5);
    opacity: 0.1;
    animation: boardFloat 20s ease-in-out infinite;
}

.board-row {
    display: flex;
    height: 12.5%;
}

.board-square {
    width: 12.5%;
    height: 100%;
    transition: background-color 0.3s ease;
}

.board-square.light {
    background-color: var(--light-bg);
}

.board-square.dark {
    background-color: var(--primary-dark);
}

@keyframes boardFloat {
    0%, 100% {
        transform: rotate(45deg) scale(1.5) translate(0, 0);
    }
    25% {
        transform: rotate(45deg) scale(1.5) translate(2%, 2%);
    }
    50% {
        transform: rotate(45deg) scale(1.5) translate(0, 4%);
    }
    75% {
        transform: rotate(45deg) scale(1.5) translate(-2%, 2%);
    }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    position: relative;
}

/* Header styles */
header {
    text-align: center;
    padding: 2rem 0;
}

.title {
    font-size: 5rem;
    color: var(--text-light);
    text-shadow: 0 0 10px rgba(245, 222, 179, 0.5);
    margin-bottom: 1rem;
    animation: glow 2s ease-in-out infinite alternate;
}

.subtitle {
    font-size: 1.5rem;
    color: var(--text-light);
    margin-bottom: 2rem;
}

/* Hero section styles */
.hero-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    position: relative;
}

.chess-pieces {
    display: flex;
    gap: 2rem;
    margin-bottom: 3rem;
}

.piece {
    font-size: 3rem;
    animation: float 3s ease-in-out infinite;
    opacity: 0.8;
    color: var(--text-light);
}

.piece:nth-child(2n) {
    animation-delay: 0.5s;
}

.piece:nth-child(3n) {
    animation-delay: 1s;
}

.play-button-container {
    text-align: center;
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.play-button {
    padding: 1.5rem 4rem;
    font-size: 1.8rem;
    background: linear-gradient(45deg, var(--primary-color), var(--primary-dark));
    color: var(--text-light);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    text-decoration: none;
}

.play-button:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
    background: linear-gradient(45deg, var(--primary-dark), var(--primary-color));
}

.profile-button {
    padding: 1.5rem 4rem;
    font-size: 1.8rem;
    background: linear-gradient(45deg, var(--primary-color), var(--primary-dark));
    color: var(--text-light);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    text-decoration: none;
}

.profile-button:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
    background: linear-gradient(45deg, var(--primary-dark), var(--primary-color));
}

.button-icon {
    font-size: 1.5rem;
}

/* Features section */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 4rem;
    padding: 2rem;
    background: var(--glass-bg);
    border-radius: 15px;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
}

.feature {
    text-align: center;
    padding: 2rem;
    background: var(--glass-bg);
    border-radius: 10px;
    transition: transform 0.3s ease;
    border: 1px solid var(--glass-border);
    outline: none;
    text-decoration: none;
    color: inherit;
    display: block;
}

.feature:hover {
    transform: translateY(-5px);
    background: rgba(139, 69, 19, 0.15);
}

.feature:focus {
    text-decoration: underline;
}

.feature h3 {
    color: var(--text-light);
    margin-bottom: 1rem;
}

.feature p {
    color: var(--text-dim);
    line-height: 1.6;
}

/* Footer styles */
footer {
    text-align: center;
    padding: 2rem 0;
    margin-top: 4rem;
    color: var(--text-dim);
}

/* Animations */
@keyframes glow {
    from {
        text-shadow: 0 0 10px rgba(245, 222, 179, 0.5);
    }
    to {
        text-shadow: 0 0 20px rgba(245, 222, 179, 0.8),
                     0 0 30px var(--primary-color);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

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

/* Responsive design */
@media (max-width: 768px) {
    .title {
        font-size: 3rem;
    }

    .subtitle {
        font-size: 1.2rem;
    }

    .chess-pieces {
        gap: 1rem;
    }

    .piece {
        font-size: 2rem;
    }

    .play-button {
        padding: 1.2rem 3rem;
        font-size: 1.5rem;
    }

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

/* Theme toggle */
.theme-toggle {
    position: fixed;
    top: 2rem;
    right: 2rem;
    z-index: 1000;
}

.theme-button {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    width: 3rem;
    height: 3rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.theme-button:hover {
    transform: scale(1.1);
    background: var(--glass-border);
}

.theme-icon {
    font-size: 1.5rem;
    transition: transform 0.3s ease;
}

[data-theme="light"] .theme-icon {
    transform: rotate(180deg);
} 