
/* ------------------------
   Global and Base Styles
------------------------- */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    width: 100%;
    overflow-x: hidden;
    font-family: 'League Spartan', sans-serif;
    background-color: #2D6056;
    background-image: url('/static/background.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-blend-mode: multiply; /* darker result: fixes the color blending problem */
    cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32" fill="none"><path d="M8 20 L24 20 L24 24 L8 24 Z" fill="%23EEEED5"/><path d="M10 18 L22 18 L22 20 L10 20 Z" fill="%23EEEED5"/><path d="M12 16 L20 16 L20 18 L12 18 Z" fill="%23EEEED5"/><path d="M14 14 L18 14 L18 16 L14 16 Z" fill="%23EEEED5"/><path d="M16 12 L16 14 L14 14 L14 16 L12 16 L12 18 L10 18 L10 20 L8 20 L8 24 L24 24 L24 20 L22 20 L22 18 L20 18 L20 16 L18 16 L18 14 L16 14 Z" stroke="%23EEEED5" stroke-width="1.5" fill="none"/><path d="M16 8 L16 12" stroke="%23EEEED5" stroke-width="2" stroke-linecap="round"/><path d="M14 6 L18 6 L18 8 L14 8 Z" fill="%23EEEED5"/><path d="M15 4 L17 4 L17 6 L15 6 Z" fill="%23EEEED5"/><circle cx="13" cy="15" r="1.2" fill="%232D6056"/><circle cx="19" cy="15" r="1.2" fill="%232D6056"/><circle cx="16" cy="17" r="1.2" fill="%232D6056"/></svg>') 16 16, auto;
}

/* Chess-themed cursor for interactive elements */
button, a, .nav-link, .stat-link, .download-button, .share-button, #submitBtn, #loadDashboardBtn {
    cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32" fill="none"><path d="M8 20 L24 20 L24 24 L8 24 Z" fill="%2343e97b"/><path d="M10 18 L22 18 L22 20 L10 20 Z" fill="%2343e97b"/><path d="M12 16 L20 16 L20 18 L12 18 Z" fill="%2343e97b"/><path d="M14 14 L18 14 L18 16 L14 16 Z" fill="%2343e97b"/><path d="M16 12 L16 14 L14 14 L14 16 L12 16 L12 18 L10 18 L10 20 L8 20 L8 24 L24 24 L24 20 L22 20 L22 18 L20 18 L20 16 L18 16 L18 14 L16 14 Z" stroke="%2343e97b" stroke-width="2" fill="none"/><path d="M16 8 L16 12" stroke="%2343e97b" stroke-width="2.5" stroke-linecap="round"/><path d="M14 6 L18 6 L18 8 L14 8 Z" fill="%2343e97b"/><path d="M15 4 L17 4 L17 6 L15 6 Z" fill="%2343e97b"/><circle cx="13" cy="15" r="1.5" fill="%232D6056"/><circle cx="19" cy="15" r="1.5" fill="%232D6056"/><circle cx="16" cy="17" r="1.5" fill="%232D6056"/><path d="M16 2 L16 4" stroke="%2343e97b" stroke-width="2" stroke-linecap="round"/></svg>') 16 16, pointer;
}

/* Special cursor for the main generate button */
.cta-button {
    cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="36" height="36" viewBox="0 0 36 36" fill="none"><path d="M9 22 L27 22 L27 27 L9 27 Z" fill="%2343e97b"/><path d="M11 20 L25 20 L25 22 L11 22 Z" fill="%2343e97b"/><path d="M13 18 L23 18 L23 20 L13 20 Z" fill="%2343e97b"/><path d="M15 16 L21 16 L21 18 L15 18 Z" fill="%2343e97b"/><path d="M18 14 L18 16 L15 16 L15 18 L13 18 L13 20 L11 20 L11 22 L9 22 L9 27 L27 27 L27 22 L25 22 L25 20 L23 20 L23 18 L21 18 L21 16 L18 16 Z" stroke="%2343e97b" stroke-width="2.5" fill="none"/><path d="M18 10 L18 14" stroke="%2343e97b" stroke-width="3" stroke-linecap="round"/><path d="M16 8 L20 8 L20 10 L16 10 Z" fill="%2343e97b"/><path d="M17 6 L19 6 L19 8 L17 8 Z" fill="%2343e97b"/><circle cx="15" cy="17" r="1.8" fill="%232D6056"/><circle cx="21" cy="17" r="1.8" fill="%232D6056"/><circle cx="18" cy="19" r="1.8" fill="%232D6056"/><path d="M18 4 L18 6" stroke="%2343e97b" stroke-width="2.5" stroke-linecap="round"/><path d="M18 2 L18 4" stroke="%2343e97b" stroke-width="2" stroke-linecap="round"/></svg>') 18 18, pointer;
}

/* Cursor trail effect */
.cursor-trail {
    position: fixed;
    width: 6px;
    height: 6px;
    background: radial-gradient(circle, rgba(67, 233, 123, 0.9) 0%, rgba(67, 233, 123, 0.6) 50%, transparent 100%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    animation: trailFade 2.5s ease-out forwards;
}

@keyframes trailFade {
    0% {
        opacity: 1;
        transform: scale(1.2);
    }
    20% {
        opacity: 0.8;
        transform: scale(1);
    }
    60% {
        opacity: 0.4;
        transform: scale(0.8);
    }
    100% {
        opacity: 0;
        transform: scale(0.2);
    }
}

/* Checkmate trail elements */
.checkmate-trail {
    position: fixed;
    width: 12px;
    height: 12px;
    pointer-events: none;
    z-index: 9998;
    animation: checkmateTrailFade 3s ease-out forwards;
}

@keyframes checkmateTrailFade {
    0% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
    30% {
        opacity: 0.8;
        transform: scale(1.2) rotate(90deg);
    }
    70% {
        opacity: 0.3;
        transform: scale(0.8) rotate(270deg);
    }
    100% {
        opacity: 0;
        transform: scale(0.3) rotate(360deg);
    }
}

/* Checkmate symbols */
.checkmate-king {
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 12 12" fill="none"><path d="M4 10 L8 10 L8 11 L4 11 Z" fill="%23FF4444"/><path d="M5 9 L7 9 L7 10 L5 10 Z" fill="%23FF4444"/><path d="M5 8 L7 8 L7 9 L5 9 Z" fill="%23FF4444"/><path d="M6 7 L6 8 L5 8 L5 9 L4 9 L4 10 L4 11 L8 11 L8 10 L7 10 L7 9 L6 9 L6 8 Z" stroke="%23FF4444" stroke-width="0.5" fill="none"/><circle cx="5" cy="8" r="0.4" fill="%23FFFFFF"/><circle cx="7" cy="8" r="0.4" fill="%23FFFFFF"/><circle cx="6" cy="9" r="0.4" fill="%23FFFFFF"/></svg>') no-repeat center;
}

.checkmate-crown {
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 12 12" fill="none"><path d="M2 8 L10 8 L10 9 L2 9 Z" fill="%23FFD700"/><path d="M3 7 L9 7 L9 8 L3 8 Z" fill="%23FFD700"/><path d="M4 6 L8 6 L8 7 L4 7 Z" fill="%23FFD700"/><path d="M5 5 L7 5 L7 6 L5 6 Z" fill="%23FFD700"/><path d="M6 4 L6 5 L5 5 L5 6 L4 6 L4 7 L3 7 L3 8 L2 8 L2 9 L10 9 L10 8 L9 8 L9 7 L8 7 L8 6 L7 6 L7 5 L6 5 Z" stroke="%23FFD700" stroke-width="0.5" fill="none"/><circle cx="5" cy="6" r="0.3" fill="%23FFFFFF"/><circle cx="7" cy="6" r="0.3" fill="%23FFFFFF"/><circle cx="6" cy="7" r="0.3" fill="%23FFFFFF"/></svg>') no-repeat center;
}

.checkmate-sword {
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 12 12" fill="none"><path d="M6 2 L6 10" stroke="%23C0C0C0" stroke-width="1" stroke-linecap="round"/><path d="M5 3 L7 3 L7 4 L5 4 Z" fill="%23FFD700"/><path d="M6 1 L6 2" stroke="%23C0C0C0" stroke-width="1.5" stroke-linecap="round"/><path d="M5 9 L7 9 L7 10 L5 10 Z" fill="%23C0C0C0"/></svg>') no-repeat center;
}

.checkmate-star {
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 12 12" fill="none"><path d="M6 1 L7 4 L10 4 L7.5 6 L8.5 9 L6 7 L3.5 9 L4.5 6 L2 4 L5 4 Z" fill="%23FFD700"/></svg>') no-repeat center;
}

/* Click effect */
.click-effect {
    position: fixed;
    width: 20px;
    height: 20px;
    background: radial-gradient(circle, rgba(67, 233, 123, 1) 0%, rgba(67, 233, 123, 0.6) 50%, transparent 100%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 10000;
    animation: clickRipple 0.6s ease-out forwards;
}

@keyframes clickRipple {
    0% {
        opacity: 1;
        transform: scale(0.5);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.5);
    }
    100% {
        opacity: 0;
        transform: scale(2.5);
    }
}

/* Chess piece click effects */
.chess-piece-click {
    position: fixed;
    width: 24px;
    height: 24px;
    pointer-events: none;
    z-index: 10001;
    animation: chessPieceEmit 1.2s ease-out forwards;
}

@keyframes chessPieceEmit {
    0% {
        opacity: 1;
        transform: scale(0.3) translateY(0px);
    }
    30% {
        opacity: 1;
        transform: scale(1.2) translateY(-20px);
    }
    100% {
        opacity: 0;
        transform: scale(0.8) translateY(-40px);
    }
}

/* Individual chess piece styles */
.chess-king {
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none"><path d="M8 20 L16 20 L16 22 L8 22 Z" fill="%2343e97b"/><path d="M9 18 L15 18 L15 20 L9 20 Z" fill="%2343e97b"/><path d="M10 16 L14 16 L14 18 L10 18 Z" fill="%2343e97b"/><path d="M11 14 L13 14 L13 16 L11 16 Z" fill="%2343e97b"/><path d="M12 12 L12 14 L11 14 L11 16 L10 16 L10 18 L9 18 L9 20 L8 20 L8 22 L16 22 L16 20 L15 20 L15 18 L14 18 L14 16 L13 16 L13 14 L12 14 Z" stroke="%2343e97b" stroke-width="1" fill="none"/><path d="M12 10 L12 12" stroke="%2343e97b" stroke-width="1.5" stroke-linecap="round"/><path d="M11 8 L13 8 L13 10 L11 10 Z" fill="%2343e97b"/><path d="M10 6 L14 6 L14 8 L10 8 Z" fill="%2343e97b"/><path d="M9 4 L15 4 L15 6 L9 6 Z" fill="%2343e97b"/><circle cx="10" cy="15" r="0.8" fill="%232D6056"/><circle cx="14" cy="15" r="0.8" fill="%232D6056"/><circle cx="12" cy="17" r="0.8" fill="%232D6056"/><path d="M12 2 L12 4" stroke="%2343e97b" stroke-width="1.5" stroke-linecap="round"/></svg>') no-repeat center;
}

.chess-queen {
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none"><path d="M8 20 L16 20 L16 22 L8 22 Z" fill="%23EEEED5"/><path d="M9 18 L15 18 L15 20 L9 20 Z" fill="%23EEEED5"/><path d="M10 16 L14 16 L14 18 L10 18 Z" fill="%23EEEED5"/><path d="M11 14 L13 14 L13 16 L11 16 Z" fill="%23EEEED5"/><path d="M12 12 L12 14 L11 14 L11 16 L10 16 L10 18 L9 18 L9 20 L8 20 L8 22 L16 22 L16 20 L15 20 L15 18 L14 18 L14 16 L13 16 L13 14 L12 14 Z" stroke="%23EEEED5" stroke-width="1" fill="none"/><path d="M12 10 L12 12" stroke="%23EEEED5" stroke-width="1.5" stroke-linecap="round"/><path d="M11 8 L13 8 L13 10 L11 10 Z" fill="%23EEEED5"/><path d="M10 6 L14 6 L14 8 L10 8 Z" fill="%23EEEED5"/><path d="M9 4 L15 4 L15 6 L9 6 Z" fill="%23EEEED5"/><circle cx="10" cy="15" r="0.8" fill="%232D6056"/><circle cx="14" cy="15" r="0.8" fill="%232D6056"/><circle cx="12" cy="17" r="0.8" fill="%232D6056"/><path d="M12 2 L12 4" stroke="%23EEEED5" stroke-width="1.5" stroke-linecap="round"/><path d="M10 0 L14 0 L14 2 L10 2 Z" fill="%23EEEED5"/></svg>') no-repeat center;
}

.chess-bishop {
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none"><path d="M8 20 L16 20 L16 22 L8 22 Z" fill="%23FFD700"/><path d="M9 18 L15 18 L15 20 L9 20 Z" fill="%23FFD700"/><path d="M10 16 L14 16 L14 18 L10 18 Z" fill="%23FFD700"/><path d="M11 14 L13 14 L13 16 L11 16 Z" fill="%23FFD700"/><path d="M12 12 L12 14 L11 14 L11 16 L10 16 L10 18 L9 18 L9 20 L8 20 L8 22 L16 22 L16 20 L15 20 L15 18 L14 18 L14 16 L13 16 L13 14 L12 14 Z" stroke="%23FFD700" stroke-width="1" fill="none"/><path d="M12 10 L12 12" stroke="%23FFD700" stroke-width="1.5" stroke-linecap="round"/><path d="M11 8 L13 8 L13 10 L11 10 Z" fill="%23FFD700"/><path d="M10 6 L14 6 L14 8 L10 8 Z" fill="%23FFD700"/><path d="M11 4 L13 4 L13 6 L11 6 Z" fill="%23FFD700"/><circle cx="12" cy="17" r="0.8" fill="%232D6056"/><path d="M12 2 L12 4" stroke="%23FFD700" stroke-width="1.5" stroke-linecap="round"/></svg>') no-repeat center;
}

.chess-knight {
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none"><path d="M8 20 L16 20 L16 22 L8 22 Z" fill="%23FF6B6B"/><path d="M9 18 L15 18 L15 20 L9 20 Z" fill="%23FF6B6B"/><path d="M10 16 L14 16 L14 18 L10 18 Z" fill="%23FF6B6B"/><path d="M11 14 L13 14 L13 16 L11 16 Z" fill="%23FF6B6B"/><path d="M12 12 L12 14 L11 14 L11 16 L10 16 L10 18 L9 18 L9 20 L8 20 L8 22 L16 22 L16 20 L15 20 L15 18 L14 18 L14 16 L13 16 L13 14 L12 14 Z" stroke="%23FF6B6B" stroke-width="1" fill="none"/><path d="M12 10 L12 12" stroke="%23FF6B6B" stroke-width="1.5" stroke-linecap="round"/><path d="M11 8 L13 8 L13 10 L11 10 Z" fill="%23FF6B6B"/><path d="M10 6 L14 6 L14 8 L10 8 Z" fill="%23FF6B6B"/><path d="M11 4 L13 4 L13 6 L11 6 Z" fill="%23FF6B6B"/><circle cx="11" cy="15" r="0.8" fill="%232D6056"/><circle cx="13" cy="15" r="0.8" fill="%232D6056"/><path d="M12 2 L12 4" stroke="%23FF6B6B" stroke-width="1.5" stroke-linecap="round"/></svg>') no-repeat center;
}

.chess-rook {
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none"><path d="M8 20 L16 20 L16 22 L8 22 Z" fill="%23A8E6CF"/><path d="M9 18 L15 18 L15 20 L9 20 Z" fill="%23A8E6CF"/><path d="M10 16 L14 16 L14 18 L10 18 Z" fill="%23A8E6CF"/><path d="M11 14 L13 14 L13 16 L11 16 Z" fill="%23A8E6CF"/><path d="M12 12 L12 14 L11 14 L11 16 L10 16 L10 18 L9 18 L9 20 L8 20 L8 22 L16 22 L16 20 L15 20 L15 18 L14 18 L14 16 L13 16 L13 14 L12 14 Z" stroke="%23A8E6CF" stroke-width="1" fill="none"/><path d="M12 10 L12 12" stroke="%23A8E6CF" stroke-width="1.5" stroke-linecap="round"/><path d="M11 8 L13 8 L13 10 L11 10 Z" fill="%23A8E6CF"/><path d="M10 6 L14 6 L14 8 L10 8 Z" fill="%23A8E6CF"/><path d="M9 4 L15 4 L15 6 L9 6 Z" fill="%23A8E6CF"/><path d="M8 2 L16 2 L16 4 L8 4 Z" fill="%23A8E6CF"/><path d="M9 0 L15 0 L15 2 L9 2 Z" fill="%23A8E6CF"/></svg>') no-repeat center;
}

.chess-pawn {
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none"><path d="M8 20 L16 20 L16 22 L8 22 Z" fill="%23DDA0DD"/><path d="M9 18 L15 18 L15 20 L9 20 Z" fill="%23DDA0DD"/><path d="M10 16 L14 16 L14 18 L10 18 Z" fill="%23DDA0DD"/><path d="M11 14 L13 14 L13 16 L11 16 Z" fill="%23DDA0DD"/><path d="M12 12 L12 14 L11 14 L11 16 L10 16 L10 18 L9 18 L9 20 L8 20 L8 22 L16 22 L16 20 L15 20 L15 18 L14 18 L14 16 L13 16 L13 14 L12 14 Z" stroke="%23DDA0DD" stroke-width="1" fill="none"/><path d="M12 10 L12 12" stroke="%23DDA0DD" stroke-width="1.5" stroke-linecap="round"/><path d="M11 8 L13 8 L13 10 L11 10 Z" fill="%23DDA0DD"/><path d="M10 6 L14 6 L14 8 L10 8 Z" fill="%23DDA0DD"/><circle cx="12" cy="17" r="1" fill="%232D6056"/></svg>') no-repeat center;
}

/* Knight trail effect */
.knight-trail {
    position: fixed;
    width: 16px;
    height: 16px;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M4 10 L12 10 L12 12 L4 12 Z" fill="%2343e97b" opacity="0.6"/><path d="M5 9 L11 9 L11 10 L5 10 Z" fill="%2343e97b" opacity="0.4"/><path d="M6 8 L10 8 L10 9 L6 9 Z" fill="%2343e97b" opacity="0.3"/><path d="M7 7 L9 7 L9 8 L7 8 Z" fill="%2343e97b" opacity="0.2"/></svg>') no-repeat center;
    pointer-events: none;
    z-index: 9998;
    animation: knightTrailFade 1.2s ease-out forwards;
}

@keyframes knightTrailFade {
    0% {
        opacity: 0.8;
        transform: scale(1) rotate(0deg);
    }
    50% {
        opacity: 0.4;
        transform: scale(0.8) rotate(180deg);
    }
    100% {
        opacity: 0;
        transform: scale(0.3) rotate(360deg);
    }
}

#background, #overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    pointer-events: none;
}

#overlay {
    background: rgba(0, 0, 0, 0.5);
    z-index: -1;
    
}

#contentContainer {
    overflow-y: visible;
    min-height: 100vh;
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    padding: 16px;
    box-sizing: border-box;
}

/* ------------------------
   Main Entry Section
------------------------- */
.main-entry {
    max-width: 900px;
    width: 100%;
    margin: 0 auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 32px;
}

/* Enhanced Input Styles */
.main-entry input[type="text"],
.main-entry select {
    width: 100%;
    max-width: 400px;
    padding: 20px 24px;
    font-family: 'League Spartan', sans-serif;
    font-size: 18px;
    font-weight: 600;
    color: #EEEED5;
    background: linear-gradient(135deg, rgba(45, 96, 86, 0.9) 0%, rgba(74, 124, 89, 0.9) 100%);
    border: 3px solid rgba(238, 238, 213, 0.3);
    border-radius: 16px;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.2),
        0 4px 16px rgba(238, 238, 213, 0.1),
        inset 0 1px 0 rgba(238, 238, 213, 0.2);
    backdrop-filter: blur(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
}

.main-entry input[type="text"]:focus,
.main-entry select:focus {
    border-color: #EEEED5;
    box-shadow: 
        0 12px 40px rgba(0, 0, 0, 0.25),
        0 8px 24px rgba(238, 238, 213, 0.2),
        inset 0 1px 0 rgba(238, 238, 213, 0.3);
    transform: translateY(-2px);
}

.main-entry input[type="text"]:hover,
.main-entry select:hover {
    border-color: rgba(238, 238, 213, 0.6);
    box-shadow: 
        0 10px 36px rgba(0, 0, 0, 0.22),
        0 6px 20px rgba(238, 238, 213, 0.15),
        inset 0 1px 0 rgba(238, 238, 213, 0.25);
}

.main-entry input[type="text"]::placeholder {
    color: rgba(238, 238, 213, 0.7);
    font-weight: 500;
}

.main-entry select {
    cursor: pointer;
    appearance: none;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M4 6 L8 10 L12 6" stroke="%23EEEED5" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>');
    background-repeat: no-repeat;
    background-position: right 20px center;
    padding-right: 50px;
}

.main-entry select option {
    background: #2D6056;
    color: #EEEED5;
    font-weight: 600;
    padding: 12px;
}

/* Input container for better spacing */
.input-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
    max-width: 400px;
    align-items: center;
}

/* Label styling */
.input-label {
    color: #EEEED5;
    font-family: 'League Spartan', sans-serif;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    margin-bottom: 8px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Dashboard Button Animations */
@keyframes pulse {
    0% { opacity: 0.5; transform: scale(1); }
    100% { opacity: 1; transform: scale(1.05); }
}

@keyframes glow {
    0% { opacity: 0.2; transform: scale(1); }
    100% { opacity: 0.4; transform: scale(1.1); }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-8px); }
    60% { transform: translateY(-4px); }
}

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

/* Enhanced Load Dashboard Button Hover Effects */
#loadDashboardBtn:hover {
    transform: translateY(-8px) scale(1.05) !important;
    box-shadow: 0 16px 60px rgba(45, 96, 86, 0.5), 0 8px 30px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(238, 238, 213, 0.3) !important;
    background: linear-gradient(135deg, #3a6b5f 0%, #5a8c6a 50%, #3a6b5f 100%) !important;
}

#loadDashboardBtn:active {
    transform: translateY(-2px) scale(1.02) !important;
    box-shadow: 0 8px 30px rgba(45, 96, 86, 0.4), 0 4px 15px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(238, 238, 213, 0.25) !important;
}

/* ------------------------
   Stats Section
------------------------- */
.stats-container {
    width: 100%;
    max-width: 1600px;
    min-height: 100vh;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px 20px;
    box-sizing: border-box;
    position: relative;
    z-index: 0;
    overflow-x: visible;
}

.background-overlay, .background-overlay-second {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

.content-container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    gap: 28px;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
}

/* ------------------------
   Row Layouts
------------------------- */
.row-0, .row-1, .row-2, .row-3 {
    display: grid;
    width: 100%;
    justify-content: center;
    gap: 30px;
    margin-bottom: 10px;
}

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

.row-1, .row-2 {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.row-3 {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 24px;
}

/* ------------------------
   Stat Boxes
------------------------- */
.stat-box {
    padding: 20px;
    background: #EEEED5;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 12px;
    box-sizing: border-box;
}

.stat-box.no-bg {
    background: none;
    box-shadow: none;
    align-items: center;
}

.stat-box.center {
    text-align: center;
    align-items: center;
}

/* ------------------------
   Text Styling
------------------------- */
.stat-title, .stat-value, .stat-details, .stat-opponent, .stat-opening {
    color: #0A4345;
    font-family: 'League Spartan', sans-serif;
    line-height: 100%;
}

.stat-title {
    font-size: 18.26px;
    font-weight: 400;
}

.stat-title.large {
    font-size: 26px;
    font-weight: 600;
}

.stat-value {
    font-size: 32.38px;
    font-weight: 700;
}

.stat-details, .stat-opponent, .stat-opening {
    font-size: 18px;
    font-weight: 700;
}

/* ------------------------
   Profile Section
------------------------- */
.profile-stats-container {
    display: flex;
    align-items: center;
}

.profile-stats-container img {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    object-fit: cover;
}

/* Row 0 Custom Layout */
.row-profile {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    width: 1133.87px;
    height: 115.46px;
}

/* Header title */
.stats-header-title {
    color: #EEEED5;
    font-size: 40px;
    font-family: 'League Spartan', sans-serif;
    font-weight: 500;
    line-height: 100%;
    text-align: center;
}

/* Profile container (image + ratings) */
.profile-stats-container-custom {
    display: flex;
    align-items: center;
}

.profile-avatar {
    border-radius: 50%;
    width: 100px;
    height: 100px;
    margin-right: 50px;
    margin-bottom: 50px;
}

.profile-ratings-row {
    display: flex;
    gap: 35px;
    flex: 1;
    margin-bottom: 50px;
}

.profile-rating-box {
    flex: 1;
    padding: 20px;
    border-radius: 8px;
}

/* Images section */
#imagesContainerCustom {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 30px;
    margin-top: 100px;
}

.images-header {
    color: #EEEED5;
    font-size: 40px;
    font-family: 'League Spartan', sans-serif;
    font-weight: 500;
    line-height: 100%;
    text-align: center;
}

.images-container img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    object-fit: contain;
    margin: 20px;
}

/* ------------------------
   Images Section
------------------------- */
#imagesContainer {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin: 100px 0 30px;
    width: 100%;
    box-sizing: border-box;
}

#imagesContainer img {
    max-width: 100%;
    border-radius: 12px;
    object-fit: contain;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* ------------------------
   Download Button
------------------------- */
.download-button {
    padding: 12px 20px;
    font-size: 16px;
    font-weight: bold;
    color: #fff;
    background-color: #4CAF50;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    font-family: 'League Spartan', sans-serif;
    margin: 20px 0;
    align-self: center;
    position: relative;
    z-index: 10;
}

.download-button:hover {
    background-color: #45a049;
}


/* Section Title */
.stat-section-header {
    color: #EEEED5;
    font-size: 40px;
    font-family: 'League Spartan', sans-serif;
    font-weight: 500;
    line-height: 100%;
    text-align: center;
    margin: 40px 0 20px;
  }
  
  /* Special stat box layout */
  .stat-box2 {
    padding: 20px;
    background: #EEEED5;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 12px;
    box-sizing: border-box;
  }
  
  /* Link inside stat box */
  .stat-link {
    color: #1b4e7d;
    font-weight: bold;
    text-decoration: underline;
    margin-top: 8px;
  }
  
  .stat-link:hover {
    color: #0d365f;
  }
  
  /* Optional: smaller date styling */
  .stat-date {
    font-size: 16px;
    font-weight: 600;
    color: #0A4345;
  }

  
/* ------------------------
   Responsive Design
------------------------- */
@media (max-width: 768px) {
    .main-entry, .content-container, .stats-container {
        padding: 12px;
    }

    .row-1, .row-2, .row-3 {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    }

    .stat-title {
        font-size: 16px;
    }

    .stat-value {
        font-size: 24px;
    }

    .stat-details, .stat-opponent, .stat-opening {
        font-size: 14px;
    }

    .stat-box {
        padding: 12px;
    }

    .profile-stats-container img {
        width: 90px;
        height: 90px;
    }

    .download-button {
        font-size: 14px;
        padding: 10px 16px;
    }
}

@media (max-width: 480px) {
    .row-1, .row-2, .row-3 {
        grid-template-columns: 1fr;
    }

    .content-container, .stats-container {
        padding: 10px;
    }

    .stat-box {
        width: 100%;
    }

    .download-button {
        width: 100%;
    }
}

/* ------------------------
   Images
------------------------- */
img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    object-fit: contain;
}

/* Navigation Styles */
.nav-link.active {
    background-color: rgba(238, 238, 213, 0.2) !important;
    border: 2px solid #EEEED5 !important;
}

.nav-link:hover {
    background-color: rgba(238, 238, 213, 0.1) !important;
    transform: translateY(-2px);
}

/* Page Content Styles */
.page-content {
    min-height: calc(100vh - 80px);
    padding-top: 20px;
}

/* Responsive Navigation */
@media (max-width: 768px) {
    #navigation .nav-link {
        font-size: 14px !important;
        padding: 8px 10px !important;
    }
    
    #navigation {
        padding: 10px 0 !important;
    }
    
    #navigation > div {
        flex-direction: column;
        gap: 15px;
    }
    
    #contentContainer {
        margin-top: 120px !important;
    }
}

@media (max-width: 480px) {
    #navigation .nav-link {
        font-size: 12px !important;
        padding: 6px 8px !important;
    }
    
    #navigation span {
        font-size: 20px !important;
    }
    
    #navigation img {
        height: 30px !important;
    }
}

/* CTA Button Styles */
.cta-button {
    width: 100%;
    max-width: unset;
    height: 44px;
    padding: 0 24px;
    font-family: 'League Spartan', sans-serif;
    font-weight: 700;
    font-size: 20px;
    color: #EEEED5;
    background: linear-gradient(90deg, #4A7C59 0%, #2D6056 100%);
    border: none;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(45, 96, 86, 0.15);
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s, transform 0.1s;
    position: relative;
    outline: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}
.cta-button:hover:not(:disabled), .cta-button:focus:not(:disabled) {
    background: linear-gradient(90deg, #2D6056 0%, #4A7C59 100%);
    box-shadow: 0 6px 20px rgba(45, 96, 86, 0.22);
    transform: translateY(-2px) scale(1.02);
}
.cta-button:active:not(:disabled) {
    background: #2D6056;
    transform: scale(0.98);
}
.cta-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Spinner for button */
.cta-spinner {
    border: 3px solid #EEEED5;
    border-top: 3px solid #4A7C59;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    animation: spin 0.8s linear infinite;
    display: inline-block;
    vertical-align: middle;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Top Loading Bar */
#loadingBar {
    width: 100%;
    height: 8px;
    background: transparent;
    border-radius: 4px;
    margin-top: 8px;
    overflow: hidden;
    position: relative;
}
.loadingBarFill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #4A7C59 0%, #2D6056 100%);
    border-radius: 4px;
    transition: width 0.4s cubic-bezier(0.4,0,0.2,1), opacity 0.3s;
    opacity: 0.05;
    min-width: 0px;
}

