/* Enhanced Games Styling - Matching Website Theme */

/* Games Section Layout */
#games.section {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 0;
    width: 100%;
}

#games.section.active {
    display: flex;
    width: 100%;
}

/* Game Container */
.game-container {
    padding: 2rem;
    background: linear-gradient(180deg, #ffffff 0%, #f8f9fa 100%);
    min-height: calc(100vh - 80px);
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
}

/* Hide game-container pseudo elements when games section is not active */
#games:not(.active) .game-container::before,
#games:not(.active) .game-container::after {
    display: none !important;
}

.game-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(44, 62, 80, 0.02) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(0, 0, 0, 0.03) 0%, transparent 50%);
    pointer-events: none;
}

/* Game Setup */
.game-setup {
    background: #ffffff;
    border-radius: 16px;
    padding: 3rem;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    text-align: center;
    border: 1px solid #e5e5e5;
    max-width: 700px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
    width: 100%;
    box-sizing: border-box;
}

.game-setup h2 {
    color: #2c3e50;
    margin-bottom: 2rem;
    font-weight: 700;
    font-size: 2.2rem;
}

.game-setup h2 i {
    color: #000000;
    margin-right: 0.5rem;
}

/* Game Options */
.game-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.game-option {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1rem;
    border: 2px solid #e5e5e5;
    transition: all 0.3s ease;
}

.game-option:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    border-color: #000000;
}

.game-option label {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    color: #2c3e50;
    font-weight: 600;
    font-size: 0.9rem;
}

.game-option label i {
    color: #000000;
    margin-right: 0.5rem;
}

.game-option select {
    padding: 0.7rem 0.8rem;
    border: 2px solid #e5e5e5;
    border-radius: 6px;
    background: white;
    color: #2c3e50;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.game-option select:focus {
    outline: none;
    border-color: #000000;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.1);
}

/* Game Filter Badge - Hidden */
.filter-info {
    display: none !important;
}

.filter-info i {
    font-size: 0.8rem;
}

/* Game Buttons */
.game-buttons {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 1.2rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
    width: 100%;
    max-width: 700px;
    margin-left: auto !important;
    margin-right: auto !important;
    box-sizing: border-box;
    padding: 0 1rem;
}

.game-btn {
    padding: 1.5rem;
    border: 2px solid #e5e5e5;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: white;
    color: #2c3e50;
    width: 250px;
    min-height: 160px;
    justify-content: center;
}

.game-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
    border-color: #000000;
}

.game-btn i {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: #000000;
}

.game-btn.matching:hover {
    background: #000000;
    color: white;
}

.game-btn.typing:hover {
    background: #2c3e50;
    color: white;
}

.game-btn small {
    font-size: 0.85rem;
    opacity: 0.8;
    font-weight: 500;
    text-transform: none;
    letter-spacing: normal;
    margin-top: 0.5rem;
    line-height: 1.3;
    text-align: center;
}

/* Force center alignment for games section */
#games .game-container {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-start !important;
    width: 100% !important;
    max-width: 1200px !important;
    margin: 0 auto !important;
}

#games .game-setup {
    margin: 0 auto !important;
    text-align: center !important;
    width: 100% !important;
    max-width: 700px !important;
}

#games .game-buttons {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    margin: 1.5rem auto !important;
    width: 100% !important;
}

/* Additional Game Header Effects */
.game-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    padding: 1rem 1.2rem;
    margin-bottom: 1rem;
    border: none;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.3);
    position: relative;
    overflow: hidden;
    animation: headerGlow 3s ease-in-out infinite alternate;
}

@keyframes headerGlow {
    0% { 
        box-shadow: 0 4px 20px rgba(102, 126, 234, 0.3);
    }
    100% { 
        box-shadow: 0 6px 25px rgba(102, 126, 234, 0.5);
    }
}

.game-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(255,255,255,0.1) 0%, transparent 100%);
    pointer-events: none;
}

.game-header::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.1) 50%, transparent 70%);
    animation: shimmer 3s linear infinite;
    pointer-events: none;
}

@keyframes shimmer {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

/* Enhanced stat items with individual colors */
.stat-item:nth-child(1) {
    background: linear-gradient(135deg, rgba(46, 213, 115, 0.1) 0%, rgba(0, 184, 169, 0.1) 100%);
    border: 1px solid rgba(46, 213, 115, 0.3);
}

.stat-item:nth-child(1) .stat-value {
    background: linear-gradient(135deg, #2ed573, #00b8a9);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-item:nth-child(2) {
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.1) 0%, rgba(238, 90, 82, 0.1) 100%);
    border: 1px solid rgba(255, 107, 107, 0.3);
}

.stat-item:nth-child(2) .stat-value {
    background: linear-gradient(135deg, #ff6b6b, #ee5a52);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-item:nth-child(3) {
    background: linear-gradient(135deg, rgba(255, 159, 67, 0.1) 0%, rgba(255, 118, 117, 0.1) 100%);
    border: 1px solid rgba(255, 159, 67, 0.3);
}

.stat-item:nth-child(3) .stat-value {
    background: linear-gradient(135deg, #ff9f43, #ff7675);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.game-stats {
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    position: relative;
    z-index: 2;
}

.stat-item {
    text-align: center;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 10px;
    padding: 0.8rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    flex: 1;
    min-width: 90px;
    max-width: 130px;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.stat-item:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    background: rgba(255, 255, 255, 1);
}

.stat-value {
    font-size: 1.4rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 0.2rem;
    line-height: 1;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    color: #5a6c7d;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1;
}

/* Game Timer - Enhanced with Colors */
.game-timer {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
    color: white;
    border-radius: 10px;
    padding: 0.8rem 1.2rem;
    font-size: 1.3rem;
    font-weight: 700;
    text-align: center;
    position: relative;
    overflow: hidden;
    flex: 0 0 auto;
    min-width: 100px;
    box-shadow: 0 3px 15px rgba(255, 107, 107, 0.4);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.game-timer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(255,255,255,0.2) 0%, transparent 100%);
    pointer-events: none;
}

.game-timer.warning {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
    animation: timer-pulse 1s infinite;
    box-shadow: 0 3px 15px rgba(243, 156, 18, 0.5);
}

.game-timer.danger {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    animation: timer-pulse-fast 0.5s infinite;
    box-shadow: 0 3px 15px rgba(231, 76, 60, 0.6);
}

@keyframes timer-pulse {
    0%, 100% { transform: scale(1); box-shadow: 0 3px 15px rgba(243, 156, 18, 0.5); }
    50% { transform: scale(1.05); box-shadow: 0 5px 20px rgba(243, 156, 18, 0.7); }
}

@keyframes timer-pulse-fast {
    0%, 100% { transform: scale(1); box-shadow: 0 3px 15px rgba(231, 76, 60, 0.6); }
    50% { transform: scale(1.08); box-shadow: 0 6px 25px rgba(231, 76, 60, 0.8); }
}

/* Game Controls */
.game-controls {
    display: flex;
    gap: 0.8rem;
    justify-content: center;
    flex-wrap: nowrap;
    align-items: center;
    margin-top: 0.8rem;
}

.control-btn {
    padding: 0.6rem 1rem;
    border: 2px solid transparent;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    background: linear-gradient(135deg, #74b9ff 0%, #0984e3 100%);
    color: white;
    min-width: 90px;
    flex: 0 1 auto;
    white-space: nowrap;
    box-shadow: 0 2px 10px rgba(116, 185, 255, 0.3);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.control-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(116, 185, 255, 0.4);
    background: linear-gradient(135deg, #81c7ff 0%, #0984e3 100%);
}

.control-btn.pause-btn {
    background: linear-gradient(135deg, #fdcb6e 0%, #e17055 100%);
    box-shadow: 0 2px 10px rgba(253, 203, 110, 0.3);
}

.control-btn.pause-btn:hover {
    background: linear-gradient(135deg, #fee2a1 0%, #e17055 100%);
    box-shadow: 0 4px 15px rgba(253, 203, 110, 0.4);
}

.control-btn.reset-btn {
    background: linear-gradient(135deg, #fd79a8 0%, #e84393 100%);
    box-shadow: 0 2px 10px rgba(253, 121, 168, 0.3);
}

.control-btn.reset-btn:hover {
    background: linear-gradient(135deg, #fd9bb5 0%, #e84393 100%);
    box-shadow: 0 4px 15px rgba(253, 121, 168, 0.4);
}
    border-color: #e74c3c;
}

/* Matching Game Styles */
.matching-game {
    display: none;
    padding: 1rem;
    height: calc(100vh - 80px);
    overflow-y: auto;
    overflow-x: hidden;
    max-width: 100%;
    margin: 0 auto;
}

/* Main container scrollbar styling */
.matching-game::-webkit-scrollbar {
    width: 8px;
}

.matching-game::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.matching-game::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.matching-game::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

.matching-area {
    margin-top: 0.5rem;
    text-align: center;
    width: 100%;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
    padding: 0 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}


/* Matching Game Layout */
.matching-header {
    text-align: center;
    margin-bottom: 0.5rem;
}

.matching-header h3 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.word-count-info {
    font-size: 0.9rem;
    color: #7f8c8d;
    font-weight: normal;
    margin-left: 0.5rem;
}

.matching-columns {
    display: grid;
    gap: 1rem;
    margin: 0.5rem auto;
    max-width: 1000px;
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 250, 252, 0.95) 100%);
    border-radius: 16px;
    box-shadow: 
        0 4px 20px rgba(0, 0, 0, 0.1),
        0 2px 8px rgba(0, 0, 0, 0.06);
    box-sizing: border-box;
    align-items: start;
}

.matching-columns.two-columns {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: minmax(400px, auto);
}

.matching-columns.four-columns {
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    grid-template-rows: minmax(400px, auto);
}

/* Column Headers */
.words-column h4,
.meanings-column h4 {
    text-align: center;
    margin-bottom: 1rem;
    padding: 0.8rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.words-column h4 {
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
}

.meanings-column h4 {
    background: linear-gradient(135deg, #9c27b0 0%, #7b1fa2 100%);
}

/* Column Lists */
.word-list,
.meaning-list {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    flex: 1;
    min-height: 0;
}

/* Four Column Layout */
.four-columns .word-list,
.four-columns .meaning-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    align-content: start;
}

.column-half {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

/* Ensure equal heights for word and meaning columns */
.matching-columns.two-columns > .words-column,
.matching-columns.two-columns > .meanings-column {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.matching-columns.two-columns > .words-column .word-list,
.matching-columns.two-columns > .meanings-column .meaning-list {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.matching-instructions {
    margin-top: 1.5rem;
    padding: 1rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    border-left: 4px solid #3498db;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.matching-instructions p {
    margin: 0;
    color: #495057;
    font-size: 0.95rem;
    font-weight: 500;
}

.game-info {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: #e8f4fd;
    color: #0066cc;
    padding: 0.3rem 0.6rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 500;
    margin-top: 0.3rem;
    border: 1px solid #b3d9ff;
}

.game-info i {
    font-size: 0.8rem;
}

/* Match Cards Styling */
.match-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 2px solid #e1e8ed;
    border-radius: 12px;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: 
        0 2px 8px rgba(0, 0, 0, 0.1),
        0 1px 3px rgba(0, 0, 0, 0.06);
}

.match-card:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 4px 15px rgba(52, 152, 219, 0.15),
        0 2px 8px rgba(0, 0, 0, 0.1);
    border-color: #3498db;
}

.match-card.selected {
    border-color: #2980b9;
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    transform: scale(1.05);
    box-shadow: 
        0 4px 20px rgba(52, 152, 219, 0.3),
        0 2px 10px rgba(52, 152, 219, 0.2);
    border-width: 3px;
}

.match-card.matched {
    border-color: #27ae60;
    background: linear-gradient(135deg, #e8f5e8 0%, #c8e6c9 100%);
    cursor: not-allowed;
    opacity: 0.8;
}

.match-card.wrong {
    border-color: #e74c3c;
    background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%);
    animation: shake 0.5s ease-in-out;
}

.word-card {
    background: linear-gradient(135deg, #fff8e1 0%, #ffecb3 100%);
    border-color: #ff9800;
    position: relative;
}

.word-card::before {
    content: '🔤';
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    font-size: 0.8rem;
    opacity: 0.6;
}

.meaning-card {
    background: linear-gradient(135deg, #f3e5f5 0%, #e1bee7 100%);
    border-color: #9c27b0;
    position: relative;
}

.meaning-card::before {
    content: '💭';
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    font-size: 0.8rem;
    opacity: 0.6;
}

.card-content {
    width: 100%;
}

.main-text {
    font-size: 1rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.25rem;
    line-height: 1.3;
    word-wrap: break-word;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.sub-text {
    font-size: 0.8rem;
    color: #7f8c8d;
    font-style: italic;
    opacity: 0.8;
    font-weight: 500;
}


@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

@keyframes match-success {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1.05); }
}

.slide-up {
    animation: slideUp 0.6s ease-out forwards;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    .game-options {
        grid-template-columns: 1fr;
        gap: 0.8rem;
        margin: 1rem 0;
    }
    
    .game-option {
        padding: 0.8rem;
    }
    
    .game-buttons {
        margin-top: 1rem !important;
        gap: 1rem;
    }
    
    .game-btn {
        width: 200px;
        min-height: 130px;
        padding: 1rem;
        font-size: 1rem;
    }
    
    .matching-columns {
        padding: 1rem;
        gap: 1.5rem;
        max-width: 95%;
        margin: 1rem auto;
    }
    
    .matching-columns.two-columns {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .matching-columns.four-columns {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .four-columns .word-list,
    .four-columns .meaning-list {
        grid-template-columns: 1fr;
    }
    
    .words-column h4,
    .meanings-column h4 {
        padding: 0.6rem;
        font-size: 0.9rem;
    }
    
    .match-card {
        min-height: 60px;
        padding: 0.8rem;
        border-radius: 10px;
    }
    
    .match-card:hover {
        transform: translateY(-1px);
    }
    
    .match-card.selected {
        transform: scale(1.03);
    }
    
    .main-text {
        font-size: 0.9rem;
        margin-bottom: 0.2rem;
    }
    
    .sub-text {
        font-size: 0.75rem;
    }
    
    
    .matching-instructions {
        padding: 0.75rem;
        margin: 1rem 0;
    }
    
    .matching-instructions p {
        font-size: 0.85rem;
    }
    
    
    .word-card::before,
    .meaning-card::before {
        font-size: 0.7rem;
        top: 0.4rem;
        right: 0.4rem;
    }
}

.words-column,
.meanings-column {
    background: #ffffff;
    border-radius: 8px;
    padding: 0.8rem;
    border: 1px solid #e5e5e5;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    height: auto;
    overflow: visible;
    align-self: stretch;
}

@media (max-width: 768px) {
    .words-column,
    .meanings-column {
        height: auto;
        max-height: none;
        min-height: 200px;
        margin-bottom: 0;
        overflow: visible;
        padding: 0.6rem;
    }
}

.column-title {
    text-align: center;
    color: #2c3e50;
    font-weight: 600;
    margin-bottom: 0.6rem;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid #f8f9fa;
    flex-shrink: 0;
}

.column-title i {
    color: #000000;
}

/* Cards Container - No individual scroll, content flows naturally */
.cards-container {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
    overflow: visible;
    padding: 0;
    height: auto;
    max-height: none;
}

/* Remove individual card container scrolling - not needed anymore */

/* Improved Match Cards */
.match-card {
    background: #ffffff;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    padding: 0.6rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    position: relative;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    margin-bottom: 0.4rem;
}

.match-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border-color: #2c3e50;
}

.match-card.selected {
    background: #2c3e50;
    color: white;
    border-color: #2c3e50;
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 6px 20px rgba(44, 62, 80, 0.3);
}

.match-card.matched {
    background: #28a745;
    color: white;
    border-color: #28a745;
    cursor: default;
    animation: match-success 0.6s ease;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.match-card.wrong {
    background: #e74c3c;
    color: white;
    border-color: #e74c3c;
    animation: shake 0.5s ease;
}

@keyframes match-success {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-3px); }
    75% { transform: translateX(3px); }
}

.card-content {
    width: 100%;
}

.card-content .word {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.1rem;
    line-height: 1.1;
}

.card-content .pronunciation {
    font-size: 0.7rem;
    opacity: 0.7;
    font-style: italic;
}

.card-content .meaning {
    font-size: 0.85rem;
    font-weight: 500;
    line-height: 1.2;
}

/* Typing Game Styles */
.typing-game {
    display: none;
    padding: 0.5rem 0;
    height: calc(100vh - 100px);
    overflow: hidden;
}

.typing-area {
    background: #ffffff;
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid #e5e5e5;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
    height: calc(100% - 1rem);
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
}

.typing-progress {
    background: #e9ecef;
    border-radius: 4px;
    height: 6px;
    margin-bottom: 1.5rem;
    overflow: hidden;
    flex-shrink: 0;
}

.typing-progress-bar {
    height: 100%;
    background: #2c3e50;
    border-radius: 6px;
    transition: width 0.5s ease;
    position: relative;
}

.word-info {
    margin-bottom: 1.5rem;
    padding: 1rem 1.5rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e5e5e5;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
    flex-shrink: 0;
}

.current-meaning {
    font-size: 1.3rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.6rem;
    line-height: 1.2;
}

.current-example {
    font-size: 0.9rem;
    color: #6c757d;
    font-style: italic;
    line-height: 1.3;
}

/* Word Hint */
.word-hint {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    padding: 1rem 1.5rem;
    margin-top: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: #856404;
    font-weight: 600;
    animation: hint-appear 0.3s ease;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

@keyframes hint-appear {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.word-hint i {
    color: #f39c12;
}

.typing-input-area {
    margin-bottom: 1.5rem;
    flex-shrink: 0;
}

.typing-input {
    width: 100%;
    max-width: 450px;
    padding: 1rem 1.5rem;
    font-size: 1.2rem;
    font-weight: 500;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    text-align: center;
    transition: all 0.3s ease;
    background: white;
    color: #2c3e50;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}

.typing-input:focus {
    outline: none;
    border-color: #2c3e50;
    box-shadow: 0 4px 15px rgba(44, 62, 80, 0.15);
    transform: translateY(-1px);
}

.typing-input::placeholder {
    color: #9ca3af;
    font-style: italic;
}

.typing-input.correct {
    border-color: #28a745;
    background: #d4edda;
    color: #155724;
    animation: correct-pulse 0.5s ease;
}

.typing-input.incorrect {
    border-color: #e74c3c;
    background: #f8d7da;
    color: #721c24;
    animation: incorrect-shake 0.5s ease;
}

@keyframes correct-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

@keyframes incorrect-shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-4px); }
    75% { transform: translateX(4px); }
}

/* Input Feedback */
.input-feedback {
    margin-top: 1rem;
    font-weight: 600;
    min-height: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 1rem;
}

/* Typing Actions */
.typing-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: nowrap;
    margin-top: 1.5rem;
    flex-shrink: 0;
    align-items: center;
}

.typing-btn {
    padding: 0.8rem 1.5rem;
    border: 2px solid #e5e5e5;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: white;
    color: #2c3e50;
    min-width: 120px;
    flex: 0 1 auto;
    white-space: nowrap;
}

.typing-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.typing-btn.check-btn {
    background: #28a745;
    color: white;
    border-color: #28a745;
}

.typing-btn.check-btn:hover {
    background: #218838;
    border-color: #218838;
}

.typing-btn.hint-btn {
    background: #f39c12;
    color: white;
    border-color: #f39c12;
}

.typing-btn.hint-btn:hover {
    background: #e67e22;
    border-color: #e67e22;
}

.typing-btn.skip-btn {
    background: #6c757d;
    color: white;
    border-color: #6c757d;
}

.typing-btn.skip-btn:hover {
    background: #5a6268;
    border-color: #5a6268;
}

.typing-btn:disabled {
    background: #e9ecef;
    color: #6c757d;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    border-color: #e5e5e5;
}

/* Progress Counter */
.typing-counter {
    position: absolute;
    top: 0.8rem;
    right: 0.8rem;
    background: #f8f9fa;
    padding: 0.4rem 0.8rem;
    border-radius: 16px;
    font-weight: 500;
    color: #2c3e50;
    border: 1px solid #e5e5e5;
    font-size: 0.8rem;
}

/* Game Results */
.game-results {
    display: none;
    background: #ffffff;
    border-radius: 16px;
    padding: 2rem;
    border: 1px solid #e5e5e5;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    text-align: center;
    margin-top: 1rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.results-title {
    font-size: 2rem;
    font-weight: 800;
    color: #2c3e50;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.results-title i {
    color: #28a745;
    font-size: 2.2rem;
}

.results-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.result-stat {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 1rem;
    border: 1px solid #e5e5e5;
}

.result-stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 0.3rem;
}

.result-stat-label {
    font-size: 0.8rem;
    color: #6c757d;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.results-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
    flex-wrap: nowrap;
    align-items: center;
}

.result-btn {
    padding: 0.8rem 1.5rem;
    border: 2px solid #e5e5e5;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: white;
    color: #2c3e50;
    text-decoration: none;
    min-width: 140px;
    flex: 0 1 auto;
    white-space: nowrap;
}

.result-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.result-btn.play-again:hover {
    background: #2c3e50;
    color: white;
    border-color: #2c3e50;
}

.result-btn.back-home:hover {
    background: #000000;
    color: white;
    border-color: #000000;
}

/* Performance Badge */
.performance-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    margin-top: 1rem;
    font-size: 0.9rem;
}

.performance-badge.excellent {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.performance-badge.good {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.performance-badge.average {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}
    text-align: center;
    border: 1px solid #e5e5e5;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    max-width: 600px;
    margin: 0 auto;
}

.game-result-title {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 2rem;
    color: #2c3e50;
}

.game-result-circle {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: conic-gradient(#2c3e50 0deg, #e0e6ed 0deg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 2rem auto;
    font-size: 2rem;
    font-weight: 800;
    color: #2c3e50;
    position: relative;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.game-result-circle::before {
    content: '';
    position: absolute;
    width: 120px;
    height: 120px;
    background: white;
    border-radius: 50%;
    z-index: -1;
}

.game-result-circle.excellent {
    background: conic-gradient(#28a745 0deg, #e0e6ed 0deg);
}

.game-result-circle.good {
    background: conic-gradient(#17a2b8 0deg, #e0e6ed 0deg);
}

.game-result-circle.average {
    background: conic-gradient(#f39c12 0deg, #e0e6ed 0deg);
}

.game-result-circle.poor {
    background: conic-gradient(#e74c3c 0deg, #e0e6ed 0deg);
}

.game-result-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.result-stat {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 1.5rem;
    border: 2px solid #e5e5e5;
}

.result-stat-value {
    font-size: 1.8rem;
    font-weight: 800;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.result-stat-label {
    color: #6c757d;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.game-result-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
    flex-wrap: wrap;
}

/* Disabled Game Buttons */
.game-btn:disabled {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
    pointer-events: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .game-container {
        padding: 1rem;
        margin: 0;
        max-width: 100%;
    }
    
    .games-section {
        padding: 1rem;
    }
    
    .game-header {
        padding: 0.8rem 1rem;
        margin-bottom: 0.8rem;
        animation: none; /* Disable animation on mobile for performance */
    }
    
    .game-header::after {
        display: none; /* Disable shimmer effect on mobile */
    }
    
    .stat-item {
        padding: 0.6rem 0.8rem;
        min-width: 80px;
        max-width: 110px;
        flex: 1;
    }
    
    .stat-value {
        font-size: 1.1rem;
    }
    
    .stat-label {
        font-size: 0.7rem;
    }
    
    .game-timer {
        font-size: 1.1rem;
        padding: 0.6rem 1rem;
        min-width: 85px;
    }
    
    .game-controls {
        gap: 0.6rem;
        margin-top: 0.6rem;
    }
    
    .control-btn {
        padding: 0.5rem 0.8rem;
        font-size: 0.8rem;
        min-width: 75px;
    }
    
    .game-setup {
        padding: 1rem;
        margin: 0 0.5rem;
    }
    
    .game-options {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .game-buttons {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
        margin-top: 1rem;
    }
    
    .game-btn {
        padding: 1.2rem;
        font-size: 1rem;
        width: 240px;
        min-height: 140px;
    }
    
    .game-btn i {
        font-size: 2rem;
    }

/* Tablet styles */
@media (max-width: 768px) and (min-width: 481px) {
    .matching-area {
        grid-template-columns: 1fr 1fr;
        gap: 0.8rem;
        height: auto;
        overflow: visible;
    }
    
    .words-column,
    .meanings-column {
        padding: 0.8rem;
        height: auto;
        max-height: none;
        overflow: visible;
        width: 100%;
        margin-bottom: 0;
        min-height: 200px;
    }
    
    .column-title {
        font-size: 0.9rem;
        margin-bottom: 0.6rem;
        padding-bottom: 0.6rem;
    }
    
    .match-card {
        padding: 0.7rem;
        min-height: 55px;
        margin-bottom: 0.4rem;
    }
    
    .card-content .word {
        font-size: 0.95rem;
    }
    
    .card-content .meaning {
        font-size: 0.85rem;
    }
}

/* Main responsive section for tablets and mobile */
@media (max-width: 768px) {    
    .matching-area {
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
        height: auto;
        overflow: visible;
        padding: 0 0.5rem;
        width: 100%;
        box-sizing: border-box;
    }
    
    .matching-columns {
        padding: 0.8rem;
        gap: 0.8rem;
        max-width: 100%;
        width: 100%;
        margin: 0.8rem auto;
        box-sizing: border-box;
    }
    
    .matching-columns.two-columns {
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
    }
    
    .matching-columns.four-columns {
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
    }
    
    .words-column,
    .meanings-column {
        padding: 0.5rem;
        height: auto;
        overflow: visible;
        width: 100%;
        margin-bottom: 0.5rem;
        align-self: stretch;
    }
    
    .column-title {
        font-size: 0.8rem;
        margin-bottom: 0.4rem;
        padding-bottom: 0.4rem;
    }
    
    .match-card {
        padding: 0.5rem;
        min-height: 45px;
        margin-bottom: 0.3rem;
    }
    
    .card-content .word {
        font-size: 0.85rem;
        font-weight: 600;
    }
    
    .card-content .pronunciation {
        font-size: 0.65rem;
        opacity: 0.7;
    }
    
    .card-content .meaning {
        font-size: 0.8rem;
        line-height: 1.2;
    }
    
    .typing-area {
        padding: 1.5rem;
        margin: 0 0.5rem;
        height: auto;
        max-height: none;
    }
    
    .word-info {
        padding: 1rem 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .current-meaning {
        font-size: 1.4rem;
        margin-bottom: 0.6rem;
    }
    
    .current-example {
        font-size: 0.9rem;
    }
    
    .typing-input {
        font-size: 1.2rem;
        padding: 1rem 1.5rem;
    }
    
    .typing-actions {
        flex-direction: row;
        justify-content: center;
        gap: 0.6rem;
        margin-top: 1rem;
        flex-wrap: wrap;
    }
    
    .typing-btn {
        padding: 0.7rem 1rem;
        font-size: 0.85rem;
        min-width: 90px;
        flex: 0 1 auto;
    }
    
    .game-results {
        padding: 1.5rem;
        margin: 0 0.5rem;
    }
    
    .results-title {
        font-size: 1.6rem;
        margin-bottom: 1rem;
    }
    
    .results-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.8rem;
        margin: 1rem 0;
    }
    
    .result-stat {
        padding: 0.8rem;
    }
    
    .result-stat-value {
        font-size: 1.3rem;
    }
    
    .results-actions {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.8rem;
        margin-top: 1.5rem;
        justify-content: center;
    }
    
    .result-btn {
        flex: 0 1 calc(50% - 0.4rem);
        min-width: 140px;
        justify-content: center;
        padding: 0.8rem;
    }
    
    .game-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .game-timer {
        grid-column: span 2;
        font-size: 1.4rem;
    }
}
    
    .stat-value {
        font-size: 1.5rem;
    }
    
    .game-controls {
        flex-direction: column;
        align-items: center;
    }
    
    .control-btn {
        width: 100%;
        max-width: 250px;
    }
}

@media (max-width: 480px) {
    .game-container {
        padding: 0.5rem;
        margin: 0;
        max-width: 100%;
        width: 100%;
        box-sizing: border-box;
    }
    
    .games-section {
        padding: 0.5rem;
    }
    
    .matching-game,
    .typing-game {
        height: auto;
        min-height: calc(100vh - 100px);
        padding: 0.5rem;
        overflow-y: auto;
        width: 100%;
        box-sizing: border-box;
    }
    
    .matching-area {
        gap: 0.5rem;
        display: block;
        width: 100%;
        padding: 0 0.25rem;
        box-sizing: border-box;
    }
    
    .matching-columns {
        padding: 0.5rem;
        gap: 0.5rem;
        max-width: 100%;
        width: 100%;
        margin: 0.5rem auto;
        box-sizing: border-box;
    }
    
    .matching-columns.two-columns,
    .matching-columns.four-columns {
        grid-template-columns: 1fr 1fr;
        gap: 0.3rem;
    }
    
    .words-column,
    .meanings-column {
        padding: 0.5rem;
        overflow: visible;
        width: 100%;
        flex: none;
        margin-bottom: 0.5rem;
    }
    
    .column-title {
        font-size: 0.8rem;
        margin-bottom: 0.5rem;
        padding-bottom: 0.5rem;
    }
    
    .match-card {
        padding: 0.4rem;
        min-height: 40px;
        margin-bottom: 0.3rem;
    }
    
    .card-content .word {
        font-size: 0.8rem;
        margin-bottom: 0.1rem;
        font-weight: 600;
    }
    
    .card-content .pronunciation {
        font-size: 0.6rem;
        opacity: 0.7;
    }
    
    .card-content .meaning {
        font-size: 0.75rem;
        line-height: 1.2;
    }
}

/* Very small screens */
@media (max-width: 360px) {
    .matching-area {
        gap: 0.3rem;
    }
    
    .words-column,
    .meanings-column {
        padding: 0.5rem;
        max-height: 320px;
    }
    
    .column-title {
        font-size: 0.75rem;
        margin-bottom: 0.4rem;
        padding-bottom: 0.4rem;
    }
    
    .match-card {
        padding: 0.5rem;
        min-height: 45px;
        margin-bottom: 0.3rem;
    }
    
    .card-content .word {
        font-size: 0.85rem;
    }
    
    .card-content .meaning {
        font-size: 0.75rem;
    }
    
    .card-content .pronunciation {
        font-size: 0.65rem;
    }
}

/* Very small screens */
@media (max-width: 360px) {
    .matching-area {
        gap: 0.3rem;
        padding: 0 0.2rem;
    }
    
    .matching-columns {
        padding: 0.4rem;
        gap: 0.2rem;
        margin: 0.4rem auto;
    }
    
    .matching-columns.two-columns,
    .matching-columns.four-columns {
        grid-template-columns: 1fr 1fr;
        gap: 0.2rem;
    }
    
    .words-column,
    .meanings-column {
        padding: 0.4rem;
        overflow: visible;
        margin-bottom: 0.4rem;
    }
    
    .column-title {
        font-size: 0.7rem;
        margin-bottom: 0.4rem;
        padding-bottom: 0.4rem;
    }
    
    .match-card {
        padding: 0.3rem;
        min-height: 35px;
        margin-bottom: 0.25rem;
    }
    
    .card-content .word {
        font-size: 0.75rem;
        font-weight: 600;
    }
    
    .card-content .meaning {
        font-size: 0.7rem;
        line-height: 1.1;
    }
    
    .card-content .pronunciation {
        font-size: 0.55rem;
        opacity: 0.7;
    }
}
    
    .typing-area {
        padding: 1rem;
        margin: 0 0.25rem;
    }
    
    .word-info {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .current-meaning {
        font-size: 1.2rem;
        margin-bottom: 0.5rem;
    }
    
    .current-example {
        font-size: 0.85rem;
    }
    
    .typing-input {
        font-size: 1.1rem;
        padding: 0.8rem 1.2rem;
    }
    
    .typing-actions {
        gap: 0.5rem;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .typing-btn {
        padding: 0.6rem 0.8rem;
        font-size: 0.8rem;
        min-width: 80px;
        flex: 0 1 calc(33.333% - 0.5rem);
        max-width: 110px;
    }
    
    .game-results {
        padding: 1rem;
        margin: 0 0.25rem;
    }
    
    .results-title {
        font-size: 1.4rem;
        margin-bottom: 0.8rem;
    }
    
    .results-stats {
        grid-template-columns: 1fr;
        gap: 0.6rem;
        margin: 0.8rem 0;
    }
    
    .result-stat {
        padding: 0.8rem;
    }
    
    .result-stat-value {
        font-size: 1.2rem;
    }
    
    .result-stat-label {
        font-size: 0.75rem;
    }
    
    .results-actions {
        gap: 0.5rem;
        margin-top: 1rem;
        flex-direction: column;
    }
    
    .result-btn {
        padding: 0.7rem;
        font-size: 0.85rem;
        width: 100%;
        min-width: auto;
    }
    
    .game-btn {
        padding: 1.2rem;
        font-size: 1rem;
        width: 250px;
        min-height: 160px;
    }
    
    .game-btn i {
        font-size: 1.8rem;
    }
    
    .game-btn small {
        font-size: 0.8rem;
    }
    
    .stat-item {
        padding: 0.8rem;
    }
    
    .stat-value {
        font-size: 1.5rem;
    }
    
    .stat-label {
        font-size: 0.8rem;
    }
    
    .game-header {
        padding: 0.6rem 0.8rem;
        margin-bottom: 0.6rem;
        animation: none;
        box-shadow: 0 2px 10px rgba(102, 126, 234, 0.3);
    }
    
    .game-header::after {
        display: none;
    }
    
    .stat-item {
        padding: 0.5rem 0.6rem;
        min-width: 70px;
        max-width: 95px;
    }
    
    .stat-value {
        font-size: 1rem;
    }
    
    .stat-label {
        font-size: 0.65rem;
    }
    
    .game-timer {
        font-size: 1rem;
        padding: 0.5rem 0.8rem;
        min-width: 75px;
    }
    
    .control-btn {
        padding: 0.4rem 0.6rem;
        font-size: 0.75rem;
        min-width: 65px;
        gap: 0.2rem;
    }
    
    .game-setup {
        padding: 1rem;
        margin: 0 0.25rem;
    }
    
    .word-hint {
        padding: 0.8rem 1rem;
        font-size: 0.9rem;
    }
    
    .performance-badge {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }
}
    .game-setup h2 {
        font-size: 1.8rem;
    }
    
    .typing-input {
        font-size: 1.2rem;
        padding: 1rem 1.5rem;
    }
    
    .current-meaning {
        font-size: 1.4rem;
    }
    
    .game-result-circle {
        width: 120px;
        height: 120px;
        font-size: 1.5rem;
    }
    
    .game-result-circle::before {
        width: 95px;
        height: 95px;
    }
}

/* Cards Container */
.cards-container {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
    overflow-y: auto;
    padding: 0;
    height: auto;
    max-height: none;
}

/* Scrollbar styles removed - no longer using individual column scrolling */

/* Hint Button */
.typing-btn.hint-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.typing-btn.hint-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(102, 126, 234, 0.4);
}

.typing-btn.hint-btn:disabled {
    background: #e9ecef;
    color: #6c757d;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Word Hint */
.word-hint {
    background: rgba(102, 126, 234, 0.1);
    border: 2px solid rgba(102, 126, 234, 0.2);
    border-radius: 12px;
    padding: 1rem;
    margin-top: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #667eea;
    font-weight: 600;
    animation: hint-appear 0.3s ease;
}

@keyframes hint-appear {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.word-hint i {
    color: #f39c12;
}

/* Input Feedback */
.input-feedback {
    margin-top: 1rem;
    font-weight: 600;
    min-height: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

/* Disabled Game Buttons */
.game-btn:disabled {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
    pointer-events: none;
}

/* Additional Responsive Styles */
@media (max-width: 640px) {
    .game-setup h2 {
        font-size: 1.6rem;
    }
    
    .game-option label {
        font-size: 1rem;
    }
    
    .stat-value {
        font-size: 1.8rem;
    }
    
    .control-btn {
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
    }
}

/* Additional Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }

.d-none { display: none !important; }
.d-block { display: block !important; }
.d-flex { display: flex !important; }
.d-grid { display: grid !important; }

.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.flex-column {
    flex-direction: column;
}

.flex-wrap {
    flex-wrap: wrap;
}

.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }

.w-100 { width: 100%; }
.h-100 { height: 100%; }

.border-radius { border-radius: 8px; }
.border-radius-lg { border-radius: 12px; }
.border-radius-xl { border-radius: 16px; }

.shadow-sm { box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05); }
.shadow { box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08); }
.shadow-lg { box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12); }

.text-primary { color: #2c3e50; }
.text-secondary { color: #6c757d; }
.text-success { color: #28a745; }
.text-warning { color: #f39c12; }
.text-danger { color: #e74c3c; }

.bg-primary { background-color: #2c3e50; }
.bg-secondary { background-color: #6c757d; }
.bg-success { background-color: #28a745; }
.bg-warning { background-color: #f39c12; }
.bg-danger { background-color: #e74c3c; }
.bg-light { background-color: #f8f9fa; }
.bg-white { background-color: #ffffff; }

.font-weight-normal { font-weight: 400; }
.font-weight-medium { font-weight: 500; }
.font-weight-semibold { font-weight: 600; }
.font-weight-bold { font-weight: 700; }
.font-weight-extrabold { font-weight: 800; }

.font-size-sm { font-size: 0.875rem; }
.font-size-base { font-size: 1rem; }
.font-size-lg { font-size: 1.125rem; }
.font-size-xl { font-size: 1.25rem; }
.font-size-2xl { font-size: 1.5rem; }

.opacity-50 { opacity: 0.5; }
.opacity-75 { opacity: 0.75; }

.cursor-pointer { cursor: pointer; }
.cursor-not-allowed { cursor: not-allowed; }

.user-select-none { user-select: none; }

.overflow-hidden { overflow: hidden; }
.overflow-auto { overflow: auto; }
.overflow-scroll { overflow: scroll; }

.position-relative { position: relative; }
.position-absolute { position: absolute; }
.position-fixed { position: fixed; }

.z-index-1 { z-index: 1; }
.z-index-10 { z-index: 10; }
.z-index-50 { z-index: 50; }

/* Focus States for Accessibility */
.match-card:focus,
.typing-input:focus,
.typing-btn:focus,
.result-btn:focus,
.game-btn:focus,
.control-btn:focus {
    outline: 2px solid #2c3e50;
    outline-offset: 2px;
}

/* Loading States */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    z-index: 100;
    backdrop-filter: blur(2px);
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e5e5e5;
    border-top: 3px solid #2c3e50;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Smooth Transitions */
.match-card,
.typing-input,
.typing-btn,
.result-btn,
.game-btn,
.control-btn {
    transition: all 0.3s ease;
}

/* Print Styles */
@media print {
    .game-container {
        display: none;
    }
}
    
    .filter-info {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }
    
    .cards-container {
        max-height: 300px;
    }
    
    .match-card {
        padding: 1rem;
    }
    
    .card-content .word {
        font-size: 1.1rem;
    }
    
    .typing-btn {
        padding: 1rem 1.5rem;
        font-size: 1rem;
    }
    
    .current-meaning {
        font-size: 1.2rem;
    }
    
    .word-hint {
        font-size: 0.9rem;
        padding: 0.8rem;
    }
}

/* Game Performance Indicators */
.performance-excellent {
    color: #00b894 !important;
}

.performance-good {
    color: #00cec9 !important;
}

.performance-average {
    color: #f39c12 !important;
}

.performance-poor {
    color: #ff6b6b !important;
}

/* Enhanced Timer States */
.game-timer.warning {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%) !important;
    animation: timer-pulse 1s infinite;
}

.game-timer.danger {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%) !important;
    animation: timer-pulse-fast 0.5s infinite;
}

@keyframes timer-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes timer-pulse-fast {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.08); }
}

/* Game Buttons Improved */
.game-btn small {
    font-size: 0.85rem;
    opacity: 0.9;
    font-weight: 500;
    text-transform: none;
    letter-spacing: normal;
    margin-top: 0.5rem;
    line-height: 1.3;
}

/* Enhanced Results Circle */
.game-result-circle {
    position: relative;
    transition: all 0.5s ease;
}

.game-result-circle.excellent {
    box-shadow: 0 10px 30px rgba(0, 184, 148, 0.3);
}

.game-result-circle.good {
    box-shadow: 0 10px 30px rgba(0, 206, 201, 0.3);
}

.game-result-circle.average {
    box-shadow: 0 10px 30px rgba(243, 156, 18, 0.3);
}

.game-result-circle.poor {
    box-shadow: 0 10px 30px rgba(255, 107, 107, 0.3);
}
.fade-in {
    animation: fadeIn 0.5s ease;
}

.slide-up {
    animation: slideUp 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Success and Error States */
.success-state {
    border-color: #00b894 !important;
    background: linear-gradient(135deg, #00b894, #00a085) !important;
    color: white !important;
}

.error-state {
    border-color: #ff6b6b !important;
    background: linear-gradient(135deg, #ff6b6b, #ee5a24) !important;
    color: white !important;
}

/* Loading State */
.loading-state {
    opacity: 0.7;
    pointer-events: none;
    position: relative;
}

.loading-state::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    border: 2px solid #667eea;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    transform: translate(-50%, -50%);
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}
