/* Crossword Game Styles */

/* Global Button Border Radius */
button,
.btn,
.game-btn,
.complete-btn,
.check-btn,
input[type="submit"],
input[type="button"] {
    border-radius: 12px !important;
}


.game-2 {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 2rem 0;
}

.game-2-section {
    background-color: transparent;
}

/* Game Container */
.card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: none !important;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* Game Header */
.game-2-section h2 {
    background: linear-gradient(45deg, #2d9ca9, #4a90e2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: bold;
    font-size: 2.2rem;
}

/* Timer and Progress Display */
.timer-display, .progress-display {
    background: #ffffff;
    color: #2f3b45;
    padding: 12px 18px;
    border-radius: 14px;
    font-weight: 700;
    font-size: 1rem;
    border: 1px solid #eef2f4;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 56px;
}

.timer-display i, .progress-display i {
    color: #fff;
    background: #2d9ca9;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Progress Bar */
.progress {
    background: linear-gradient(90deg, #e3f2fd, #f3e5f5);
    border-radius: 15px;
    overflow: hidden;
    height: 16px !important;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.progress-bar {
    background: linear-gradient(90deg, #2d9ca9, #4a90e2, #9c27b0);
    background-size: 200% 100%;
    animation: progressGradient 3s ease infinite;
    border-radius: 15px;
    box-shadow: 0 2px 8px rgba(45, 156, 169, 0.4);
}

@keyframes progressGradient {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Game Content Wrapper */
.game-content-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Game Grid Section */
.game-grid-section {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.game-grid-section.mb-4 {
    overflow: hidden !important;
    touch-action: none !important;
}

/* Word Search Grid Container */
.word-search-container {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(248, 249, 250, 0.95));
    border-radius: 20px;
    padding: 25px;
    box-shadow: 
        0 15px 35px rgba(0, 0, 0, 0.1),
        0 5px 15px rgba(0, 0, 0, 0.05);
    border: 2px solid #e3f2fd;
    backdrop-filter: blur(10px);
    width: 100%;
    margin: 0 auto;
    overflow-x: auto;
    max-width: 100vw;
}

/* Game Words Section */
.game-words-section {
    width: 100%;
}

.game-title {
    text-align: center;
    color: white;
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 30px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.game-instructions {
    text-align: center;
    color: white;
    font-size: 1.1rem;
    margin-bottom: 20px;
    background: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 10px;
    backdrop-filter: blur(10px);
}

.game-controls {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 20px;
    background: #ffffff;
    padding: 14px 18px;
    border-radius: 16px;
    border: 1px solid #eef2f4;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
}

.game-stats {
    display: flex;
    gap: 20px;
    color: white;
    font-weight: 500;
}

.game-stats div {
    background: #ffffff;
    padding: 10px 16px;
    border-radius: 14px;
    border: 1px solid #eef2f4;
    color: #2f3b45;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.control-buttons {
    display: flex;
    gap: 10px;
}

.control-buttons button,
.control-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #fff;
    padding: 10px 15px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.control-buttons button:hover,
.control-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.game-content {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 30px;
    margin-top: 20px;
}

.word-search-grid-container {
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.word-search-grid {
    /* width: fit-content; */
    min-width: 0;
    overflow-x: auto;
    max-width: 100vw;
}

.word-search-row {
    display: flex;
    justify-content: center;
}

.word-search-cell {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 1.5px;
    background: linear-gradient(135deg, #ffffff, #f8f9fa);
    border: 1.5px solid #dee2e6;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    color: #495057;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
    -webkit-user-select: none;
    box-shadow: 
        0 2px 4px rgba(0, 0, 0, 0.08),
        inset 0 1px 2px rgba(255, 255, 255, 0.9);
}

.word-search-cell:hover {

    border-color: #2d9ca9;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(45, 156, 169, 0.2);
}

.word-search-cell.selected {
    background: linear-gradient(135deg, #2d9ca9, #4a90e2);
    border-color: #2d9ca9;
    color: white;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(45, 156, 169, 0.4);
}

.word-search-cell.selecting {
    background: linear-gradient(135deg, rgba(45, 156, 169, 0.3), rgba(74, 144, 226, 0.3));
    border-color: #2d9ca9;
    transform: scale(1.02);
    box-shadow: 0 3px 8px rgba(45, 156, 169, 0.3);
}

.word-search-cell.found-word {
    background: #28a745 !important;
    border-color: #1e7e34 !important;
    color: white !important;
    animation: found-pulse 0.6s ease-in-out;
}

.word-search-cell.hint-given {
    background: #ffc107 !important;
    border-color: #e0a800 !important;
    color: #333 !important;
    animation: hint-glow 2s ease-in-out;
}

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

@keyframes foundPulse {
    0% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.05); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes hint-glow {
    0%, 100% { box-shadow: 0 0 5px #ffc107; }
    50% { box-shadow: 0 0 20px #ffc107; }
}

.word-list-section {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(248, 249, 250, 0.95));
    border-radius: 20px;
    padding: 0;
    box-shadow: 
        0 15px 35px rgba(0, 0, 0, 0.1),
        0 5px 15px rgba(0, 0, 0, 0.05);
    border: 2px solid #e3f2fd;
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    width: 100%;
}

/* Section Header */
.section-header {
    background: linear-gradient(135deg, #2d9ca9, #4a90e2);
    color: white;
    padding: 20px 25px;
    border-radius: 18px 18px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 8px rgba(45, 156, 169, 0.2);
}

.words-counter {
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 1rem;
    backdrop-filter: blur(5px);
}

/* Word List Container */
.word-list-container {
    padding: 25px;
    overflow: hidden;
}

.word-list-title {
    color: white;
    font-size: 1.3rem;
    font-weight: bold;
    margin: 0;
}

.word-list {
    display: grid;
    /* grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); */
    gap: 15px;
    max-height: 500px;
    overflow-y: auto;
    padding-right: 8px;
}

.word-list::-webkit-scrollbar {
    width: 6px;
}

.word-list::-webkit-scrollbar-track {
    background: #f1f3f4;
    border-radius: 10px;
}

.word-list::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #2d9ca9, #4a90e2);
    border-radius: 10px;
}

.word-item {
    background: linear-gradient(135deg, #ffffff, #f8f9fa);
    border-radius: 12px;
    padding: 16px;
    transition: all 0.3s ease;
    text-align: left;
    border: 2px solid #e9ecef;
    box-shadow: 
        0 4px 8px rgba(0, 0, 0, 0.08),
        0 2px 4px rgba(0, 0, 0, 0.04);
    display: flex;
    align-items: flex-start;
    gap: 12px;
    min-height: 70px;
}

.word-item:hover {
    background: linear-gradient(135deg, #e3f2fd, #f3e5f5);
    border-color: #2d9ca9;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(45, 156, 169, 0.2);
}

.word-item.found {
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    border: 2px solid #28a745;
    position: relative;
    animation: foundPulse 0.6s ease-in-out;
}

.word-item.found::after {
    content: '✓';
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    color: #28a745;
    font-weight: bold;
    font-size: 14px;
}

.clue-number {
    background: linear-gradient(135deg, #2d9ca9, #4a90e2);
    color: white;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    flex-shrink: 0;
    box-shadow: 0 3px 8px rgba(45, 156, 169, 0.3);
    margin-top: 2px;
}

.word-text {
    color: #495057;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.5;
    /* word-break: break-word;
    flex: 1; */
}

/* Progress Info */
.progress-info {
    padding: 20px 25px;
    border-top: 1px solid #e9ecef;
    background: rgba(248, 249, 250, 0.6);
    border-radius: 0 0 18px 18px;
}

.challenge-note {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    font-size: 0.9rem;
    font-weight: 500;
}

.challenge-note i {
    color: #2d9ca9;
}

.word-item.found .word-text {
    text-decoration: line-through;
    opacity: 0.8;
}

.progress-section {
    grid-column: 1 / -1;
    margin-top: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 15px;
    backdrop-filter: blur(10px);
}

.progress-bar {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    height: 20px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    background: linear-gradient(90deg, #28a745, #20c997);
    height: 100%;
    width: 0%;
    transition: width 0.5s ease;
    border-radius: 10px;
}

.progress-text {
    color: white;
    text-align: center;
    font-weight: 500;
}

/* New Fact Popup Styles */
.fact-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.75);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.fact-popup-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.fact-popup-content {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 20px;
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.25),
        0 10px 20px rgba(0, 0, 0, 0.15);
    border: 3px solid #e3f2fd;
    max-width: 500px;
    width: 100%;
    max-height: 80vh;
    overflow: hidden;
    animation: modalSlideIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
}

@keyframes modalSlideIn {
    0% {
        opacity: 0;
        transform: scale(0.7) translateY(-50px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.fact-popup-header {
    background: linear-gradient(135deg, #2d9ca9, #4a90e2);
    color: white;
    padding: 20px 25px;
    border-radius: 17px 17px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.fact-popup-header h4 {
    margin: 0;
    font-size: 1.4rem;
    font-weight: bold;
    color: white;
}

.fact-close-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.fact-close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.fact-popup-body {
    padding: 25px;
    text-align: center;
    max-height: 60vh;
    overflow-y: auto;
}

.found-word-display {
    background: #ffffff;
    border: 1px solid #eef2f4;
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 16px;
    font-size: 1.1rem;
    font-weight: 700;
    color: #2f3b45;
    text-transform: none; /* sentence case */
    letter-spacing: 0;
}

.fact-content-text {
    background: #f8fafb;
    border-left: 4px solid #2d9ca9;
    border-radius: 10px;
    padding: 16px;
    margin: 12px 0 4px 0;
    font-size: 1rem;
    line-height: 1.6;
    color: #2f3b45;
    text-align: left;
}

.fact-popup-footer {
    padding: 20px 25px;
    border-top: 1px solid #e9ecef;
    text-align: center;
    background: rgba(248, 249, 250, 0.8);
    border-radius: 0 0 17px 17px;
}

.fact-awesome-btn {
    background: linear-gradient(135deg, #81b832, #81b832);
    border: none;
    color: white;
    padding: 12px 30px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 6px 18px rgba(129, 184, 50, 0.35);
}

.fact-awesome-btn:hover {
    filter: brightness(1.05);
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(129, 184, 50, 0.45);
    color: #fff;
}

/* Responsive adjustments for fact popup */
@media (max-width: 768px) {
    .fact-popup-overlay {
        padding: 15px;
    }
    
    .fact-popup-content {
        max-width: 95vw;
    }
    
    .fact-popup-header h4 {
        font-size: 1.2rem;
    }
    
    .fact-popup-body {
        padding: 20px;
    }
    
    .found-word-display {
        font-size: 1.1rem;
        padding: 12px;
    }
    
    .fact-content-text {
        font-size: 0.9rem;
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .fact-popup-overlay {
        padding: 10px;
    }
    
    .fact-popup-header {
        padding: 15px 20px;
    }
    
    .fact-popup-header h4 {
        font-size: 1.1rem;
    }
    
    .fact-popup-body {
        padding: 15px;
    }
    
    .fact-popup-footer {
        padding: 15px 20px;
    }
    
    .fact-awesome-btn {
        padding: 10px 25px;
        font-size: 0.9rem;
    }
}

.hint-message {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    z-index: 999;
    animation: popIn 0.3s ease-out;
}

.hint-message p {
    margin: 0;
    color: #333;
    font-weight: 500;
}

.completion-celebration {
    text-align: center;
    color: white;
}

.completion-celebration h3 {
    font-size: 2rem;
    margin-bottom: 15px;
    color: #ffd700;
    animation: bounce 1s ease infinite alternate;
}

@keyframes bounce {
    0% { transform: scale(1); }
    100% { transform: scale(1.05); }
}

.certificate {
    border: 3px solid #2d9ca9;
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0;
    color: white;
    position: relative;
}

.certificate::before {
    content: '🏆';
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    padding: 5px;
    border-radius: 50%;
    font-size: 1.5rem;
}

.certificate h4 {
    color: #4cabb6;
    margin-bottom: 10px;
    font-size: 1.4rem;
}

/* Feature Cards */
.feature-card {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border: 2px solid #e3f2fd;
    transition: all 0.3s ease;
}

.feature-card:hover {
    background: linear-gradient(135deg, #e3f2fd, #f3e5f5);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border-color: #2d9ca9;
}

.feature-card h5 {
    color: #333;
    font-weight: bold;
}

/* Button Animations */
.btn {
    transition: all 0.3s ease;
    font-weight: 600;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.btn-outline-secondary {
    border-color: #6c757d;
    background: linear-gradient(135deg, transparent, rgba(108, 117, 125, 0.1));
}

.btn-outline-secondary:hover {
    background: linear-gradient(135deg, #6c757d, #5a6268);
    border-color: #5a6268;
    color: white;
}

.btn-outline-primary {
    border-color: #2d9ca9;
    background: linear-gradient(135deg, transparent, rgba(45, 156, 169, 0.1));
    color: #2d9ca9;
}

.btn-outline-primary:hover {
    background: linear-gradient(135deg, #2d9ca9, #4a90e2);
    border-color: #2d9ca9;
    color: #fff;
}

.btn-outline-info {
    border-color: #ff9800;
    color: #ff9800;
}

.btn-outline-info:hover {
    background: #ff9800;
    border-color: #ff9800;
    color: #fff;
}

/* Ensure icons inside primary/secondary buttons are white when hovered or active */
.btn-outline-primary:hover i,
.btn-outline-secondary:hover i,
.btn.btn-primary i,
.btn.btn-secondary i { color: #fff !important; }

/* Hint bulb color standardization */
.btn-outline-warning,
#showHint.btn,
.control-btn#showHint {
    color: #ffc107;
    border-color: #ffc107;
}
.btn-outline-warning:hover,
#showHint.btn:hover,
.control-btn#showHint:hover {
    background: #ffc107;
    border-color: #ffc107;
    color: #212529;
}

/* Game Controls */
.game-controls button {
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.game-controls button:hover {
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

/* Unify rounded control buttons to match platform style */
.game-2-section .game-controls .btn-outline-secondary,
.game-2-section .game-controls .btn-outline-primary {
    background: linear-gradient(135deg, #2d9ca9, #4a90e2);
    border: none;
    color: #fff;
}
.game-2-section .game-controls .btn-outline-secondary i,
.game-2-section .game-controls .btn-outline-primary i { color: #fff; }
.game-2-section .game-controls .btn-outline-secondary:hover,
.game-2-section .game-controls .btn-outline-primary:hover {
    filter: brightness(1.05);
    transform: translateY(-1px);
}

/* New unified control pill component */
.control-pill {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    border-radius: 14px;
    font-weight: 600;
    font-size: 0.95rem;
    background: #ffffff;
    color: #2f3b45;
    border: 1px solid #e9ecef;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    transition: transform 0.12s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    min-height: 56px;
}
.control-pill .label, .control-pill span { white-space: nowrap; }
.control-pill i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 1rem;
}
.control-pill:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.08);
    border-color: #dee2e6;
}
.control-pill:active { transform: translateY(0); }
.control-pill:focus { outline: none; box-shadow: 0 0 0 3px rgba(77, 144, 254, 0.25); }

.control-pill--primary {
    border-color: #cfe9f2;
}
.control-pill--primary i {
    background: linear-gradient(135deg, #2d9ca9, #4a90e2);
    color: #ffffff;
}

.control-pill--secondary {
    border-color: #e1e7ea;
}
.control-pill--secondary i {
    background: linear-gradient(135deg, #6d8a99, #4f6b78);
    color: #ffffff;
}

.control-pill--warning {
    border-color: #ffe08a;
    color: #3b3b3b;
}
.control-pill--warning i {
    background: #ffc107;
    color: #212529;
}

/* Confetti Animation */
.confetti-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
}

.confetti-container::before,
.confetti-container::after {
    content: '';
    position: absolute;
    width: 10px;
    height: 10px;
    background: #ffd700;
    animation: confetti 3s ease-in-out infinite;
}

.confetti-container::before {
    left: 10%;
    animation-delay: 0s;
}

.confetti-container::after {
    left: 20%;
    animation-delay: 0.5s;
    background: #ff6b6b;
}

@keyframes confetti {
    0% {
        transform: translateY(-100vh) rotateZ(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotateZ(720deg);
        opacity: 0;
    }
}

/* Tutorial Steps */
.tutorial-steps .step {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1rem;
    border: 2px solid #e3f2fd;
    transition: all 0.3s ease;
}

.tutorial-steps .step:hover {
    background: linear-gradient(135deg, #e3f2fd, #f3e5f5);
    border-color: #2d9ca9;
    transform: translateX(10px);
}

.tutorial-steps .number {
    background: linear-gradient(135deg, #2d9ca9, #4a90e2);
    color: white;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    flex-shrink: 0;
    font-size: 1.1rem;
    margin-right: 1rem;
    box-shadow: 0 3px 10px rgba(45, 156, 169, 0.3);
}

.tutorial-steps p {
    margin: 0;
    line-height: 1.5;
    color: #333;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .game-content-wrapper {
        max-width: 100%;
        padding: 0 20px;
    }
    
    .word-search-container {
        max-width: 650px;
        padding: 20px;
    }
    
    .word-search-grid {
        padding: 15px;
    }
    
    .word-search-cell {
        width: 34px;
        height: 34px;
        font-size: 14px;
    }
    
    .word-list {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 12px;
    }
}

@media (max-width: 992px) {
    .word-search-container {
        max-width: 580px;
        padding: 18px;
    }
    
    .word-search-grid {
        padding: 12px;
    }
    
    .word-search-cell {
        width: 32px;
        height: 32px;
        font-size: 13px;
        margin: 1px;
    }
    
    .word-list {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 10px;
        max-height: 400px;
    }
}

@media (max-width: 768px) {
    .game-2-section h2 {
        font-size: 1.8rem;
    }
    
    .game-controls {
        flex-direction: column;
        gap: 15px;
        align-items: center;
    }
    
    .timer-display, .progress-display {
        font-size: 1rem;
        padding: 0.4rem 0.8rem;
    }
    
    .game-content-wrapper {
        padding: 0 15px;
    }
    
    .word-search-container {
        max-width: 100%;
        padding: 15px;
    }
    
    .word-search-grid {
        padding: 10px;
    }
    
    .word-search-cell {
        width: 28px;
        height: 28px;
        font-size: 12px;
        margin: 0.8px;
    }
    
    .section-header {
        padding: 18px 20px;
    }
    
    .word-list-title {
        font-size: 1.2rem;
    }
    
    .words-counter {
        padding: 6px 12px;
        font-size: 0.9rem;
    }
    
    .word-list-container {
        padding: 20px;
    }
    
    .word-list {
        grid-template-columns: 1fr;
        gap: 8px;
        max-height: 350px;
    }
    
    .word-item {
        padding: 14px;
        gap: 10px;
        min-height: 60px;
    }
    
    .word-text {
        font-size: 12px;
    }
    
    .clue-number {
        width: 24px;
        height: 24px;
        font-size: 11px;
    }
    
    .progress-info {
        padding: 18px 20px;
    }
}

@media (max-width: 480px) {
    .game-2-section h2 {
        font-size: 1.5rem;
    }
    .word-search-cell {
        width: 24px;
        height: 24px;
        font-size: 11px;
        margin: 0.5px;
    }
    .word-search-grid {
        padding: 8px;
        overflow-x: auto;
    }
    .word-search-container {
        padding: 8px;
        max-width: 100%;
    }
    .game-words-section {
        width: 100%;
    }
    .word-list {
        grid-template-columns: 1fr;
        gap: 5px;
        max-height: 220px;
        overflow-y: auto;
    }
    .word-text {
        font-size: 10px;
    }
    .word-item {
        padding: 8px;
        gap: 8px;
    }
    .clue-number {
        width: 18px;
        height: 18px;
        font-size: 9px;
    }
    .feature-card h5 {
        font-size: 1rem;
    }
    .feature-card p {
        font-size: 0.9rem;
    }
    .fact-content {
        padding: 20px;
        max-width: 350px;
        width: 95vw;
    }
    .fact-content h5 {
        font-size: 1.2rem;
    }
    .fact-content p {
        font-size: 0.9rem;
    }
} 