/* ===================================
   GLOBAL STYLES
   =================================== */

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

:root {
    --primary: #00ff88;
    --secondary: #0066ff;
    --dark-bg: #0a0a0f;
    --card-bg: #151520;
    --text-light: #e0e0e0;
    --text-muted: #8a8a9f;
    --danger: #ff2600;
    --warning: #ff6b00;
    --success: #00ff88;
}

html {
    scroll-behavior: smooth;
}

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

/* Animated background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(0, 255, 136, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(0, 102, 255, 0.05) 0%, transparent 50%);
    z-index: -1;
    animation: gradientShift 15s ease infinite;
}

@keyframes gradientShift {
    0%, 100% { 
        opacity: 1; 
        transform: scale(1); 
    }
    50% { 
        opacity: 0.8; 
        transform: scale(1.1); 
    }
}

/* ===================================
   NAVBAR
   =================================== */

.navbar {
    background: rgba(10, 10, 15, 0.8) !important;
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 1.2rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

.navbar.scrolled {
    padding: 0.8rem 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--text-light) !important;
    transition: transform 0.3s ease;
}

.navbar-brand:hover {
    transform: translateX(5px);
}

.navbar-brand img {
    height: 50px;
    transition: transform 0.3s ease;
}

.navbar-brand:hover img {
    transform: rotate(360deg);
}

.nav-link {
    color: var(--text-muted) !important;
    font-weight: 500;
    padding: 0.5rem 1.5rem !important;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover {
    color: var(--primary) !important;
}

.nav-link:hover::after {
    width: 70%;
}

/* ===================================
   HERO SECTION (INDEX PAGE)
   =================================== */

.hero-fullscreen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    padding: 2rem;
    overflow: hidden;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-fullscreen .container {
    position: relative;
    z-index: 1;
}

.hero-logo {
    height: 240px;
    margin-bottom: 2rem;
    opacity: 0;
    animation: fadeInUp 1s ease forwards;
    filter: drop-shadow(0 10px 30px rgba(0, 255, 136, 0.3));
}

.hero-fullscreen h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    opacity: 0;
    animation: fadeInUp 1s ease 0.2s forwards;
}

.hero-fullscreen p {
    font-size: 1.3rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 3rem;
    opacity: 0;
    animation: fadeInUp 1s ease 0.4s forwards;
}

.btn-get-started {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border: none;
    color: var(--dark-bg);
    padding: 1.2rem 3rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 255, 136, 0.3);
    opacity: 0;
    animation: fadeInUp 1s ease 0.6s forwards;
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
}

.btn-get-started::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transition: all 0.6s ease;
    transform: translate(-50%, -50%);
}

.btn-get-started:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(0, 255, 136, 0.4);
}

.btn-get-started:hover::before {
    width: 400px;
    height: 400px;
}

.btn-get-started i {
    transition: transform 0.3s ease;
}

.btn-get-started:hover i {
    transform: translateY(3px);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===================================
   CHESS BOARD & ANIMATIONS
   =================================== */

.chess-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 0;
    opacity: 0.4;
    pointer-events: none;
}

.chess-board {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    grid-template-rows: repeat(8, 1fr);
    gap: 1px;
    border: 3px solid rgba(0, 255, 136, 0.4);
    border-radius: 8px;
    box-shadow: 
        0 0 60px rgba(0, 255, 136, 0.3),
        inset 0 0 40px rgba(0, 255, 136, 0.1),
        0 0 100px rgba(0, 102, 255, 0.2);
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    
    /* Responsive sizing */
    width: min(85vw, 500px, 85vh);
    height: min(85vw, 500px, 85vh);
    
    /* Smooth scaling */
    transition: all 0.3s ease;
    
    /* Subtle animation */
    animation: board-glow 8s ease-in-out infinite;
}

@keyframes board-glow {
    0%, 100% {
        box-shadow: 
            0 0 60px rgba(0, 255, 136, 0.3),
            inset 0 0 40px rgba(0, 255, 136, 0.1),
            0 0 100px rgba(0, 102, 255, 0.2);
    }
    50% {
        box-shadow: 
            0 0 80px rgba(0, 255, 136, 0.4),
            inset 0 0 50px rgba(0, 255, 136, 0.15),
            0 0 120px rgba(0, 102, 255, 0.3);
    }
}

.chess-square {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(18px, 4vw, 28px);
    transition: all 0.3s ease;
    position: relative;
}

.chess-square:hover {
    transform: scale(1.02);
    z-index: 3;
}

.light-square {
    background: rgba(72, 103, 73, 0.629);
}

.dark-square {
    background: rgba(41, 50, 46, 0.519);
}

/* ===================================
   CHESS MOVE HIGHLIGHTS
   =================================== */

.chess-square.white-move {
    background: rgba(0, 255, 136, 0.6) !important;
    border: 2px solid #00ff88;
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.8);
    z-index: 2;
    transform: scale(1.05);
}

.chess-square.black-move {
    background: rgba(0, 102, 255, 0.6) !important;
    border: 2px solid #0066ff;
    box-shadow: 0 0 20px rgba(0, 102, 255, 0.8);
    z-index: 2;
    transform: scale(1.05);
}

/* ===================================
   CHECK & CHECKMATE STYLES
   =================================== */

.chess-square.check {
    background: rgba(255, 38, 0, 0.7) !important;
    border: 2px solid var(--danger);
    box-shadow: 
        0 0 20px rgba(255, 38, 0, 0.8),
        inset 0 0 10px rgba(255, 255, 255, 0.3);
    z-index: 2;
    transform: scale(1.05);
    animation: check-pulse 2s ease-in-out;
}

.chess-square.checkmate {
    background: linear-gradient(135deg, rgba(255, 38, 0, 0.8), rgba(139, 0, 0, 0.9)) !important;
    border: 3px solid gold;
    box-shadow: 
        0 0 30px rgba(255, 38, 0, 1),
        0 0 60px rgba(255, 215, 0, 0.6),
        inset 0 0 20px rgba(255, 255, 255, 0.5);
    z-index: 2;
    transform: scale(1.08);
    animation: checkmate-pulse 1.5s ease-in-out infinite;
}

@keyframes check-pulse {
    0%, 100% {
        box-shadow: 
            0 0 20px rgba(255, 38, 0, 0.8),
            inset 0 0 10px rgba(255, 255, 255, 0.3);
    }
    50% {
        box-shadow: 
            0 0 30px rgba(255, 38, 0, 1),
            inset 0 0 15px rgba(255, 255, 255, 0.5);
    }
}

@keyframes checkmate-pulse {
    0%, 100% {
        box-shadow: 
            0 0 30px rgba(255, 38, 0, 1),
            0 0 60px rgba(255, 215, 0, 0.6),
            inset 0 0 20px rgba(255, 255, 255, 0.5);
    }
    50% {
        box-shadow: 
            0 0 40px rgba(255, 38, 0, 1),
            0 0 80px rgba(255, 215, 0, 0.8),
            inset 0 0 30px rgba(255, 255, 255, 0.7);
    }
}

/* ===================================
   CHESS INDICATORS & EFFECTS
   =================================== */

.check-indicator {
    position: absolute;
    background: linear-gradient(135deg, var(--danger), var(--warning));
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(255, 38, 0, 0.6);
    z-index: 10;
    animation: pulse-check 0.6s ease-in-out 3;
    white-space: nowrap;
}

.checkmate-indicator {
    position: absolute;
    background: linear-gradient(135deg, var(--danger), #ff0000, #8b0000);
    color: white;
    padding: 12px 24px;
    border-radius: 25px;
    font-weight: bold;
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 2px;
    box-shadow: 0 6px 25px rgba(255, 0, 0, 0.8);
    z-index: 10;
    animation: pulse-checkmate 0.8s ease-in-out infinite;
    white-space: nowrap;
    border: 2px solid gold;
}

@keyframes pulse-check {
    0%, 100% {
        transform: translateX(-50%) scale(1);
    }
    50% {
        transform: translateX(-50%) scale(1.1);
    }
}

@keyframes pulse-checkmate-indicator {
    0%, 100% {
        transform: translateX(-50%) scale(1);
        box-shadow: 0 6px 25px rgba(255, 0, 0, 0.8);
    }
    50% {
        transform: translateX(-50%) scale(1.15);
        box-shadow: 0 8px 35px rgba(255, 0, 0, 1);
    }
}

/* ===================================
   CHESS ANIMATION EFFECTS
   =================================== */

.game-result {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.7));
    color: white;
    padding: 20px 40px;
    border-radius: 15px;
    font-size: 24px;
    font-weight: bold;
    text-align: center;
    display: none;
    z-index: 100;
    backdrop-filter: blur(20px);
    border: 2px solid gold;
    box-shadow: 0 0 50px rgba(255, 215, 0, 0.5);
    animation: result-pulse 2s ease-in-out infinite;
}

@keyframes result-pulse {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        box-shadow: 0 0 50px rgba(255, 215, 0, 0.5);
    }
    50% {
        transform: translate(-50%, -50%) scale(1.05);
        box-shadow: 0 0 70px rgba(255, 215, 0, 0.8);
    }
}

.move-trail {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    position: absolute;
    font-size: inherit;
    z-index: 5;
    transition: all 0.6s ease-in-out;
    pointer-events: none;
}

.capture-effect {
    position: absolute;
    font-size: 24px;
    color: var(--danger);
    z-index: 6;
    animation: capture-pulse 0.8s ease-out;
    pointer-events: none;
}

@keyframes capture-pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.5);
        opacity: 0.7;
    }
    100% {
        transform: scale(2);
        opacity: 0;
    }
}

.brilliant-effect {
    position: absolute;
    font-size: 20px;
    z-index: 7;
    animation: brilliant-spin 2s ease-in-out;
    pointer-events: none;
}

@keyframes brilliant-spin {
    0% { transform: scale(0) rotate(0deg); opacity: 0; }
    25% { transform: scale(1.2) rotate(180deg); opacity: 1; }
    50% { transform: scale(1) rotate(360deg); }
    75% { transform: scale(1.3) rotate(540deg); }
    100% { transform: scale(0) rotate(720deg); opacity: 0; }
}  

@keyframes great-pop {
    0% { transform: scale(0); opacity: 0; }
    40% { transform: scale(1.3); opacity: 1; }
    100% { transform: scale(0); opacity: 0; }
}

/* ===================================
   CONFETTI ANIMATION
   =================================== */

@keyframes confetti-fall {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 0.8;
    }
    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

.confetti {
    pointer-events: none;
}

/* ===================================
   CARDS GRID (INDEX PAGE)
   =================================== */

.tools-section {
    padding: 5rem 0;
    min-height: 100vh;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    padding: 2rem 0;
}

.app-card {
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 2.5rem;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    transform: translateY(50px);
}

.app-card.slide-in {
    animation: slideInUp 0.6s ease forwards;
}

@keyframes slideInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.app-card:hover {
    transform: translateY(-10px);
    border-color: rgba(0, 255, 136, 0.3);
    box-shadow: 0 20px 40px rgba(0, 255, 136, 0.1);
}

.app-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    opacity: 0;
    transition: opacity 0.4s ease;
}

.app-card:hover::before {
    opacity: 0.05;
}

.card-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
    position: relative;
    z-index: 1;
    transition: transform 0.4s ease;
}

.app-card:hover .card-icon {
    transform: scale(1.1) rotate(5deg);
}

.app-card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
}

.app-card p {
    color: var(--text-muted);
    margin-bottom: 2rem;
    line-height: 1.6;
    position: relative;
    z-index: 1;
}

.status-badge {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: rgba(138, 138, 159, 0.2);
    color: var(--text-muted);
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 1;
}

.status-badge.active {
    background: rgba(0, 255, 136, 0.2);
    color: var(--primary);
}

/* ===================================
   STRATEGY PAGE SPECIFIC STYLES
   =================================== */

   .player-input {
    width: 100%;
    padding: 1rem 1.5rem;
    font-size: 1.1rem;
    font-family: 'Inter', sans-serif;
    background: #0a0a0f;
    border: 2px solid rgba(0, 255, 136, 0.2);
    border-radius: 12px;
    color: var(--text-light);
    transition: all 0.3s ease;
    outline: none;
}

.player-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 255, 136, 0.1);
    background: rgba(0, 255, 136, 0.02);
}

.player-input::placeholder {
    color: var(--text-muted);
    opacity: 0.6;
}

.player-input:hover {
    border-color: rgba(0, 255, 136, 0.4);
}

/* Analysis output formatting */
.output-pre strong {
    color: var(--primary);
}

.output-pre em {
    color: var(--secondary);
    font-style: italic;
}

/* Responsive input */
@media (max-width: 768px) {
    .player-input {
        font-size: 1rem;
        padding: 0.875rem 1.25rem;
    }
}

/* ===================================
   VALIDATOR PAGE SPECIFIC
   =================================== */

/* Upload Area Styles */
.upload-area {
    margin-bottom: 1.5rem;
}

.file-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
    border: 2px dashed var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: transparent;
}

.file-label:hover {
    border-color: var(--primary-color);
    background-color: rgba(99, 102, 241, 0.05);
}

.file-label i {
    color: var(--text-muted);
    transition: color 0.3s ease;
}

.file-label:hover i {
    color: var(--primary-color);
}

#fileName {
    font-weight: 500;
    color: var(--text-secondary);
    text-align: center;
    max-width: 90%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.upload-status {
    margin-top: 1rem;
    padding: 0.75rem;
    border-radius: 8px;
    text-align: center;
    font-size: 0.9rem;
}

.upload-status:empty {
    display: none;
}

/* Loading state for upload button */
.run-btn.loading {
    opacity: 0.7;
    cursor: not-allowed;
    position: relative;
}

.run-btn.loading::after {
    content: "";
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: translateY(-50%) rotate(360deg); }
}

.back-btn {
    color: var(--text-muted);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 10px;
    transition: all 0.3s ease;
    font-weight: 500;
    margin-bottom: 2rem;
}

.back-btn:hover {
    color: var(--primary);
    background: rgba(0, 255, 136, 0.1);
    transform: translateX(-5px);
}

.main-content {
    padding: 3rem 0;
    min-height: calc(100vh - 200px);
}

.page-header {
    margin-bottom: 3rem;
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
}

.page-header h1 {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.page-header p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

.validator-card {
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 2.5rem;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
    opacity: 0;
    animation: fadeInUp 0.6s ease 0.2s forwards;
}

.validator-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, var(--primary), var(--secondary));
}
.card-title-wrapper {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.card-title-wrapper h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
}

.info-icon {
    color: var(--text-muted);
    cursor: help;
    transition: all 0.3s ease;
}

.info-icon:hover {
    color: var(--primary);
    transform: scale(1.1);
}

.run-btn {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border: none;
    color: var(--dark-bg);
    padding: 1rem 3rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 255, 136, 0.3);
}

.run-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transition: all 0.6s ease;
    transform: translate(-50%, -50%);
}

.run-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(0, 255, 136, 0.4);
}

.run-btn:hover::before {
    width: 400px;
    height: 400px;
}

.run-btn:active {
    transform: translateY(-1px);
}

.run-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.run-btn.loading {
    pointer-events: none;
}

.run-btn.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 3px solid var(--dark-bg);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    right: 2rem;
    top: 50%;
    transform: translateY(-50%);
}

@keyframes spin {
    to { transform: translateY(-50%) rotate(360deg); }
}

.output-card {
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 2.5rem;
    opacity: 0;
    animation: fadeInUp 0.6s ease 0.4s forwards;
}

.output-pre {
    background: #0a0a0f;
    border: 1px solid rgba(0, 255, 136, 0.1);
    border-radius: 15px;
    padding: 2rem;
    color: var(--text-light);
    font-family: 'Courier New', monospace;
    font-size: 0.95rem;
    line-height: 1.6;
    max-height: 500px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
    position: relative;
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.3);
}

.output-pre.has-content {
    animation: slideIn 0.5s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.output-pre::-webkit-scrollbar {
    width: 10px;
}

.output-pre::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
}

.output-pre::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 10px;
}

.output-pre::-webkit-scrollbar-thumb:hover {
    background: var(--secondary);
}

.status-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 0.5rem;
    animation: pulse 2s ease infinite;
}

.status-indicator.waiting {
    background: var(--text-muted);
}

.status-indicator.processing {
    background: var(--secondary);
}

.status-indicator.success {
    background: var(--primary);
}

.status-indicator.error {
    background: var(--danger);
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* ===================================
   CARDS (SHARED)
   =================================== */

.card {
    background: var(--card-bg);
    color: var(--text-light);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    opacity: 0;
    transition: opacity 0.4s ease;
}

.card:hover {
    transform: translateY(-10px);
    border-color: rgba(0, 255, 136, 0.3);
    box-shadow: 0 20px 40px rgba(0, 255, 136, 0.1);
}

.card:hover::before {
    opacity: 0.05;
}

.card-body {
    position: relative;
    z-index: 1;
}

.card-title {
    font-weight: 700;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.card-subtitle {
    font-weight: 400;
    color: var(--text-muted);
}

.card-text {
    color: var(--text-muted);
    line-height: 1.6;
}

/* ===================================
   BUTTONS (SHARED)
   =================================== */

.btn-modern {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
    padding: 0.8rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
    overflow: hidden;
}

.btn-modern::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: var(--primary);
    transition: all 0.5s ease;
    transform: translate(-50%, -50%);
    z-index: -1;
}

.btn-modern:hover {
    color: var(--dark-bg);
    transform: translateX(5px);
}

.btn-modern:hover::before {
    width: 300px;
    height: 300px;
}

.btn-modern:disabled {
    border-color: var(--text-muted);
    color: var(--text-muted);
    cursor: not-allowed;
}

.btn-modern:disabled:hover {
    transform: none;
    color: var(--text-muted);
}

.btn-modern:disabled::before {
    display: none;
}

.btn-outline-light {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
    padding: 0.8rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-outline-light::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: var(--primary);
    transition: all 0.5s ease;
    transform: translate(-50%, -50%);
    z-index: -1;
}

.btn-outline-light:hover {
    color: var(--dark-bg);
    border-color: var(--primary);
    transform: translateX(5px);
}

.btn-outline-light:hover::before {
    width: 300px;
    height: 300px;
}

.btn-outline-light:disabled {
    border-color: var(--text-muted);
    color: var(--text-muted);
    cursor: not-allowed;
}

.btn-outline-light:disabled:hover {
    transform: none;
    color: var(--text-muted);
    background: transparent;
}

.btn-outline-light:disabled::before {
    display: none;
}

.btn-lg {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
}

/* ===================================
   PREFORMATTED OUTPUT
   =================================== */

pre {
    white-space: pre-wrap;
    word-wrap: break-word;
    max-height: 500px;
    overflow-y: auto;
    background: #0a0a0f;
    border: 1px solid rgba(0, 255, 136, 0.1);
    color: var(--text-light);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    font-family: 'Courier New', monospace;
}

pre::-webkit-scrollbar {
    width: 10px;
}

pre::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
}

pre::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 10px;
}

pre::-webkit-scrollbar-thumb:hover {
    background: var(--secondary);
}

/* ===================================
   CODE ELEMENTS
   =================================== */

code {
    background: rgba(0, 255, 136, 0.1);
    padding: 0.2rem 0.6rem;
    border-radius: 5px;
    color: var(--primary);
    font-family: 'Courier New', monospace;
}

/* ===================================
   CONTAINER
   =================================== */

.container {
    max-width: 1200px;
}

/* ===================================
   FOOTER
   =================================== */

footer {
    text-align: center;
    padding: 3rem 0;
    margin-top: 5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
}

/* ===================================
   ACCESSIBILITY & REDUCED MOTION
   =================================== */

@media (prefers-reduced-motion: reduce) {
    .chess-square,
    .move-trail,
    .capture-effect,
    .brilliant-effect,
    .check-indicator,
    .checkmate-indicator,
    .confetti {
        animation: none;
        transition: none;
    }
    
    .chess-board {
        animation: none;
    }
}

@media (prefers-contrast: high) {
    .light-square {
        background: #ffffff;
    }
    
    .dark-square {
        background: #000000;
    }
    
    .chess-square.check {
        background: #ff0000 !important;
        border: 3px solid #ffff00;
    }
    
    .chess-square.checkmate {
        background: #ff0000 !important;
        border: 4px solid #ffff00;
    }
}

/* ===================================
   RESPONSIVE DESIGN
   =================================== */

@media (max-width: 768px) {
    .hero-fullscreen h1 {
        font-size: 2.5rem;
    }

    .hero-fullscreen p {
        font-size: 1.1rem;
    }

    .hero-logo {
        height: 150px;
    }

    .btn-get-started {
        padding: 1rem 2rem;
        font-size: 1rem;
    }

    .chess-board {
        width: min(90vw, 350px);
        height: min(90vw, 350px);
        border-width: 2px;
    }

    .chess-square {
        font-size: clamp(16px, 4vw, 22px);
    }

    .chess-container {
        opacity: 0.3;
    }

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

    .navbar-brand img {
        height: 40px;
    }

    .page-header h1 {
        font-size: 2rem;
    }

    .validator-card, 
    .output-card {
        padding: 1.5rem;
    }

    .run-btn {
        width: 100%;
        padding: 1rem 2rem;
    }

    .card {
        margin-bottom: 1.5rem;
    }

    .move-annotation {
        font-size: 12px;
        padding: 8px 16px;
        top: -40px;
    }
    
    .game-result {
        font-size: 18px;
        padding: 15px 30px;
    }
    
    .move-trail {
        width: 30px;
        height: 30px;
    }

    .check-indicator {
        font-size: 12px;
        padding: 6px 12px;
    }
    
    .checkmate-indicator {
        font-size: 14px;
        padding: 10px 20px;
    }
}

@media (max-width: 480px) {
    .chess-board {
        width: min(85vw, 280px);
        height: min(85vw, 280px);
    }
    
    .chess-square {
        font-size: clamp(14px, 3.5vw, 18px);
    }
    
    .hero-logo {
        height: 120px;
    }
    
    .hero-fullscreen h1 {
        font-size: 2rem;
    }

    .move-annotation {
        font-size: 10px;
        padding: 6px 12px;
        top: -35px;
    }
    
    .game-result {
        font-size: 16px;
        padding: 12px 24px;
    }
    
    .check-indicator {
        font-size: 10px;
        padding: 4px 10px;
    }
    
    .checkmate-indicator {
        font-size: 12px;
        padding: 8px 16px;
    }
}