@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;700;900&family=Noto+Serif+SC:wght@400;700;900&display=swap');

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

body {
    font-family: 'Noto Serif SC', serif;
    background: #0d0d0d;
    color: #d4af37;
    overflow-x: hidden;
}

/* Chess Background */
.chess-bg {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background: 
        radial-gradient(circle at 30% 50%, rgba(212, 175, 55, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 70% 50%, rgba(139, 69, 19, 0.05) 0%, transparent 50%),
        repeating-conic-gradient(#1a1a1a 0% 25%, #2d2d2d 0% 50%) 0 0 / 50px 50px;
    z-index: -1;
    animation: bgMove 20s linear infinite;
}

@keyframes bgMove {
    0% { background-position: 0 0; }
    100% { background-position: 50px 50px; }
}

/* Header */
header {
    background: linear-gradient(180deg, rgba(13, 13, 13, 0.95) 0%, rgba(13, 13, 13, 0.8) 100%);
    padding: 1.5rem 5%;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 2px solid #d4af37;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-family: 'Cinzel', serif;
    font-size: 2rem;
    color: #d4af37;
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
}

.chess-icon {
    font-size: 3rem;
    animation: chessFloat 3s ease-in-out infinite;
}

@keyframes chessFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-10px) rotate(5deg); }
}

nav ul {
    display: flex;
    list-style: none;
    gap: 3rem;
}

nav ul li a {
    color: #d4af37;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
    transition: all 0.3s;
    position: relative;
    font-family: 'Cinzel', serif;
}

nav ul li a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: #d4af37;
    box-shadow: 0 0 10px #d4af37;
    transition: width 0.3s;
}

nav ul li a:hover::after {
    width: 100%;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 5%;
    background: 
        radial-gradient(ellipse at 20% 50%, rgba(212, 175, 55, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 50%, rgba(139, 69, 19, 0.1) 0%, transparent 50%);
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
}

.hero-text h1 {
    font-family: 'Cinzel', serif;
    font-size: 5rem;
    margin-bottom: 2rem;
    line-height: 1.2;
}

.gold-text {
    color: #ffd700;
    text-shadow: 
        0 0 10px #ffd700,
        0 0 20px #ffd700,
        0 0 30px #d4af37;
    animation: goldGlow 3s infinite;
}

@keyframes goldGlow {
    0%, 100% { text-shadow: 0 0 10px #ffd700, 0 0 20px #ffd700; }
    50% { text-shadow: 0 0 20px #ffd700, 0 0 40px #ffd700, 0 0 60px #d4af37; }
}

.hero-text p {
    font-size: 1.3rem;
    line-height: 1.8;
    margin-bottom: 2rem;
    color: #c19a6b;
}

.game-features {
    display: flex;
    gap: 2rem;
    margin-bottom: 3rem;
}

.feature {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #d4af37;
}

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

.hero-buttons {
    display: flex;
    gap: 2rem;
}

.btn {
    padding: 1rem 2.5rem;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 700;
    font-size: 1.2rem;
    font-family: 'Cinzel', serif;
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: all 0.3s;
}

.btn-gold {
    background: linear-gradient(135deg, #d4af37 0%, #ffd700 100%);
    color: #0d0d0d;
    border: 2px solid #d4af37;
    box-shadow: 0 10px 30px rgba(212, 175, 55, 0.3);
}

.btn-gold:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(212, 175, 55, 0.5);
}

.btn-outline-gold {
    border: 2px solid #d4af37;
    color: #d4af37;
    background: transparent;
}

.btn-outline-gold:hover {
    background: #d4af37;
    color: #0d0d0d;
    transform: translateY(-3px);
}

/* Chessboard */
.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.chessboard {
    position: relative;
    width: 400px;
    height: 400px;
    background: 
        repeating-conic-gradient(#2d2d2d 0% 25%, #1a1a1a 0% 50%) 0 0 / 100px 100px;
    border: 5px solid #d4af37;
    border-radius: 10px;
    box-shadow: 
        0 0 30px rgba(212, 175, 55, 0.5),
        inset 0 0 30px rgba(0, 0, 0, 0.5);
    animation: boardFloat 6s ease-in-out infinite;
}

@keyframes boardFloat {
    0%, 100% { transform: translateY(0) rotateX(0deg); }
    50% { transform: translateY(-20px) rotateX(5deg); }
}

.board {
    width: 100%;
    height: 100%;
    position: relative;
}

.piece {
    position: absolute;
    font-size: 4rem;
    cursor: pointer;
    transition: all 0.3s;
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.8);
    animation: pieceAppear 0.5s ease-out backwards;
}

.piece:hover {
    transform: scale(1.2);
    filter: brightness(1.3);
}

.king { top: 10%; left: 50%; animation-delay: 0s; }
.queen { top: 10%; left: 30%; animation-delay: 0.1s; }
.rook { top: 30%; left: 20%; animation-delay: 0.2s; }
.bishop { top: 30%; left: 60%; animation-delay: 0.3s; }
.knight { top: 50%; left: 40%; animation-delay: 0.4s; }
.pawn { top: 70%; left: 50%; animation-delay: 0.5s; }

@keyframes pieceAppear {
    0% {
        transform: scale(0) rotate(180deg);
        opacity: 0;
    }
    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

.move-indicator {
    position: absolute;
    width: 100px;
    height: 100px;
    border: 3px solid rgba(212, 175, 55, 0.5);
    border-radius: 50%;
    animation: movePulse 2s infinite;
}

@keyframes movePulse {
    0%, 100% { 
        transform: scale(1);
        opacity: 0.5;
    }
    50% { 
        transform: scale(1.2);
        opacity: 1;
    }
}

/* Sections */
.section {
    padding: 5rem 5%;
    background: rgba(13, 13, 13, 0.95);
}

.section-dark {
    background: rgba(10, 10, 10, 0.95);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    font-family: 'Cinzel', serif;
    font-size: 3rem;
    margin-bottom: 4rem;
    color: #ffd700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.highlight {
    color: #d4af37;
}

/* Factions Grid */
.factions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.faction-card {
    background: rgba(26, 26, 26, 0.8);
    padding: 2rem;
    border-radius: 15px;
    border: 2px solid rgba(212, 175, 55, 0.3);
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.faction-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    transition: height 0.3s;
}

.empire::before { background: linear-gradient(90deg, #c0c0c0, #808080); }
.horde::before { background: linear-gradient(90deg, #8b4513, #cd853f); }
.mystics::before { background: linear-gradient(90deg, #9400d3, #4b0082); }
.undead::before { background: linear-gradient(90deg, #556b2f, #6b8e23); }

.faction-card:hover::before {
    height: 100%;
    opacity: 0.1;
}

.faction-card:hover {
    transform: translateY(-10px);
    border-color: #d4af37;
    box-shadow: 0 10px 30px rgba(212, 175, 55, 0.3);
}

.faction-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
}

.faction-card h3 {
    font-family: 'Cinzel', serif;
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: #ffd700;
}

.faction-card p {
    color: #c19a6b;
    margin-bottom: 2rem;
}

.faction-stats {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.stat {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stat span {
    min-width: 50px;
    font-size: 0.9rem;
    color: #d4af37;
}

.stat-bar {
    flex: 1;
    height: 8px;
    background: rgba(212, 175, 55, 0.1);
    border-radius: 5px;
    overflow: hidden;
}

.fill {
    height: 100%;
    background: linear-gradient(90deg, #d4af37, #ffd700);
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
    transition: width 1s ease-out;
}

/* Battle Grid */
.battle-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.battle-card {
    background: rgba(26, 26, 26, 0.8);
    padding: 2.5rem 2rem;
    border-radius: 15px;
    text-align: center;
    border: 2px solid rgba(212, 175, 55, 0.3);
    transition: all 0.3s;
}

.battle-card:hover {
    transform: translateY(-10px) rotate(2deg);
    border-color: #d4af37;
    box-shadow: 0 10px 30px rgba(212, 175, 55, 0.3);
}

.battle-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
}

.battle-card h3 {
    font-family: 'Cinzel', serif;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #ffd700;
}

.battle-card p {
    color: #c19a6b;
    line-height: 1.6;
}

/* Modes Container */
.modes-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.mode-card {
    background: rgba(26, 26, 26, 0.8);
    padding: 2.5rem;
    border-radius: 15px;
    border: 2px solid rgba(212, 175, 55, 0.3);
    transition: all 0.3s;
}

.mode-card:hover {
    transform: translateY(-10px);
    border-color: #d4af37;
    box-shadow: 0 10px 30px rgba(212, 175, 55, 0.3);
}

.mode-header {
    margin-bottom: 1.5rem;
}

.mode-badge {
    display: inline-block;
    background: linear-gradient(135deg, #d4af37, #ffd700);
    color: #0d0d0d;
    padding: 0.3rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.mode-badge.special {
    background: linear-gradient(135deg, #9400d3, #4b0082);
    color: white;
}

.mode-card h3 {
    font-family: 'Cinzel', serif;
    font-size: 1.8rem;
    color: #ffd700;
    margin-bottom: 1rem;
}

.mode-card p {
    color: #c19a6b;
    margin-bottom: 1.5rem;
}

.mode-info {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
    color: #d4af37;
    font-size: 0.9rem;
}

.btn-mode {
    display: block;
    text-align: center;
    padding: 1rem;
    background: linear-gradient(135deg, #d4af37, #ffd700);
    color: #0d0d0d;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 700;
    transition: all 0.3s;
    font-family: 'Cinzel', serif;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-mode:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(212, 175, 55, 0.5);
}

/* Footer */
footer {
    background: #050505;
    padding: 4rem 5% 2rem;
    border-top: 2px solid #d4af37;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-section h3 {
    font-family: 'Cinzel', serif;
    font-size: 1.8rem;
    color: #ffd700;
    margin-bottom: 1rem;
}

.footer-section h4 {
    font-family: 'Cinzel', serif;
    font-size: 1.3rem;
    color: #d4af37;
    margin-bottom: 1rem;
}

.footer-section p {
    color: #c19a6b;
}

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

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: #c19a6b;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section ul li a:hover {
    color: #d4af37;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(212, 175, 55, 0.3);
    color: #c19a6b;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-text h1 {
        font-size: 3rem;
    }
    
    .game-features {
        flex-direction: column;
        gap: 1rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .chessboard {
        width: 300px;
        height: 300px;
    }
    
    .piece {
        font-size: 3rem;
    }
    
    nav ul {
        display: none;
    }
}

/* Piece Move Animation */
@keyframes pieceMove {
    0% {
        transform: translate(0, 0);
    }
    100% {
        transform: translate(100px, -100px);
    }
}

/* Gold Particle Effect */
.gold-particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: #ffd700;
    border-radius: 50%;
    pointer-events: none;
    animation: particleFade 1s ease-out forwards;
}

@keyframes particleFade {
    0% {
        opacity: 1;
        transform: translate(0, 0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(var(--tx), var(--ty)) scale(0);
    }
}