/* ============================================
   COSMIC WORD HUNTER THEME - Complete Redesign
   ============================================ */

/* Dark Mode Base */
.dark-mode  {
    background: linear-gradient(135deg, #0A1128 0%, #1E3A8A 50%, #1E293B 100%);
    color: #F1F5F9;
}

.color-blind-mode body {
    background: #ffffff;
}

/* Tool Section with Animated Background */
.tool-section {
    position: relative;
    padding-bottom: 40px;
    background: linear-gradient(135deg, #F0F9FF 0%, #E0F2FE 50%, #FECDD3 100%);
    overflow: hidden;
}

.dark-mode .tool-section {
    background: linear-gradient(135deg, #0A1128 0%, #1E3A8A 50%, #1E293B 100%);
}

/* Animated Geometric Background */
.left-section-img, .right-section-img {
    position: absolute;
    z-index: 0;
    width: 200px;
    height: 400px;
    opacity: 0;
    animation: fadeInSide 0.5s ease-out 0.5s forwards, float 6s ease-in-out 1s infinite;
}

.left-section-img {
    left: -50px;
    top: 20%;
    transform: rotate(45deg);
}

.right-section-img {
    right: -50px;
    top: 40%;
    transform: rotate(-45deg);
}

@keyframes fadeInSide {
    from { opacity: 0; }
    to { opacity: 0.15; }
}

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

/* Game Container */
.game-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0px;
    position: relative;
    z-index: 1;
}

.tool-grid {
    display: grid;
    grid-template-rows: repeat(6, 68px);
    margin-bottom: 5px;
}

.tool-row {
    display: flex;
    gap: 8px;
    margin: 10px 0;
    flex-wrap: wrap;
}

/* Hexagonal/Octagonal Tiles with Neon Glow */
.tile {
    border: 3px solid transparent;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 26px;
    clip-path: polygon(30% 0%, 70% 0%, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0% 70%, 0% 30%);
    font-weight: 800;
    text-transform: uppercase;
    max-width: 56px !important;
    max-height: 56px !important;
    color: #0F172A;
    background: linear-gradient(135deg, #FFFFFF 0%, #F1F5F9 100%);
    box-shadow: 0 4px 15px rgba(6, 182, 212, 0.2), inset 0 2px 4px rgba(255, 255, 255, 0.5);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
}

.tile::before {
    content: '';
    position: absolute;
    inset: 0;
    clip-path: polygon(30% 0%, 70% 0%, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0% 70%, 0% 30%);
    background: linear-gradient(135deg, transparent, rgba(6, 182, 212, 0.1));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.tile:hover::before {
    opacity: 1;
}

.dark-mode .tile {
    background: linear-gradient(135deg, #1E293B 0%, #334155 100%);
    color: #F1F5F9;
    border-color: #475569;
    box-shadow: 0 4px 15px rgba(6, 182, 212, 0.3), inset 0 2px 4px rgba(255, 255, 255, 0.05);
}

.color-blind-mode .tile {
    border: 3px solid #000000;
    background-color: #ffffff;
    color: #000000;
    clip-path: none;
    border-radius: 8px;
}

/* Correct - Green (Wordle Standard) */
.tile.correct {
    background: linear-gradient(135deg, #6AAA64 0%, #538D4E 100%);
    color: white;
    border-color: #6AAA64;
    box-shadow: 0 0 20px rgba(106, 170, 100, 0.8), 0 0 40px rgba(106, 170, 100, 0.4), inset 0 2px 8px rgba(255, 255, 255, 0.3);
    animation: neonPulse 1.5s ease-in-out infinite;
}

@keyframes neonPulse {
    0%, 100% { box-shadow: 0 0 20px rgba(106, 170, 100, 0.8), 0 0 40px rgba(106, 170, 100, 0.4); }
    50% { box-shadow: 0 0 30px rgba(106, 170, 100, 1), 0 0 60px rgba(106, 170, 100, 0.6); }
}

.color-blind-mode .tile.correct {
    border-color: #000000;
}

.popup p {
    text-align: left;
    margin: 0;
}

/* Present - Yellow (Wordle Standard) */
.tile.present {
    background: linear-gradient(135deg, #C9B458 0%, #B59F3B 100%);
    color: white;
    border-color: #C9B458;
    box-shadow: 0 0 20px rgba(201, 180, 88, 0.8), 0 0 40px rgba(201, 180, 88, 0.4), inset 0 2px 8px rgba(255, 255, 255, 0.3);
}

.color-blind-mode .tile.present {
    background-color: #ff8c00;
    border-color: #000000;
    color: #000000;
}

/* Absent - Dark with subtle glow */
.tile.absent {
    background: linear-gradient(135deg, #475569 0%, #334155 100%);
    color: white;
    border-color: #475569;
    box-shadow: 0 4px 12px rgba(71, 85, 105, 0.4);
}

.dark-mode .tile.absent {
    background: linear-gradient(135deg, #334155 0%, #1E293B 100%);
    border-color: #334155;
}

.color-blind-mode .tile.absent {
    background-color: #d3d3d3;
    border-color: #000000;
    color: #000000;
}

/* New Animation - Scale & Glow instead of Flip */
.tile.flip {
    animation: scaleGlow 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes scaleGlow {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.3) rotate(5deg); opacity: 0.8; box-shadow: 0 0 40px currentColor; }
    100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

/* Keyboard - Glassmorphism Style */
.keyboard {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.keyboard-row {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: nowrap;
}

.key {
    padding: 12px 0px;
    font-size: 17px;
    font-weight: 700;
    text-transform: uppercase;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(6, 182, 212, 0.3);
    height: 48px;
    min-width: 54px;
    width: 100%;
    border-radius: 12px;
    cursor: pointer;
    color: #0F172A;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 12px rgba(6, 182, 212, 0.15);
}

.key:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 6px 20px rgba(6, 182, 212, 0.4), 0 0 15px rgba(6, 182, 212, 0.3);
    border-color: #06B6D4;
}

.dark-mode .key {
    background: rgba(30, 41, 59, 0.7);
    backdrop-filter: blur(10px);
    color: #F1F5F9;
    border-color: rgba(6, 182, 212, 0.4);
}

.color-blind-mode .key {
    background-color: #ffffff;
    color: #000000;
    border: 3px solid #000000;
}

.dark-mode .key:hover {
    background: rgba(30, 41, 59, 0.9);
    transform: translateY(-3px) scale(1.05);
}

.color-blind-mode .key:hover {
    background-color: #e0e0e0;
}

.key.correct {
    background: linear-gradient(135deg, #6AAA64 0%, #538D4E 100%);
    color: white;
    border-color: #6AAA64;
    box-shadow: 0 0 15px rgba(106, 170, 100, 0.6);
}

.color-blind-mode .key.correct {
    border-color: #000000;
}

.key.present {
    background: linear-gradient(135deg, #C9B458 0%, #B59F3B 100%);
    color: white;
    border-color: #C9B458;
    box-shadow: 0 0 15px rgba(201, 180, 88, 0.6);
}

.color-blind-mode .key.present {
    background-color: #ff8c00;
    color: #000000;
    border-color: #000000;
}

.key.absent {
    background: linear-gradient(135deg, #475569 0%, #334155 100%);
    color: white;
    border-color: #475569;
}

.dark-mode .key.absent {
    background: linear-gradient(135deg, #334155 0%, #1E293B 100%);
}

.color-blind-mode .key.absent {
    background-color: #d3d3d3;
    color: #000000;
    border-color: #000000;
}

/* Glassmorphism Popups */
.popup {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(30px);
    border: 2px solid rgba(6, 182, 212, 0.3);
    padding: 25px;
    box-shadow: 0 25px 80px rgba(6, 182, 212, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.6);
    z-index: 9999;
    max-width: 600px;
    text-align: center;
    max-height: 560px;
    overflow: auto;
    border-radius: 24px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.dark-mode .popup {
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(30px);
    border-color: rgba(6, 182, 212, 0.4);
    color: #F1F5F9;
}

.color-blind-mode .popup {
    border: 3px solid #000000;
}

.popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.popup-header h2 {
    margin: 0;
    font-size: 32px;
    font-weight: 900;
    text-transform: uppercase;
    background: linear-gradient(135deg, #6AAA64, #538D4E, #C9B458);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 2px;
}

.popup-header button {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: #64748B;
    transition: all 0.3s ease;
}

.popup-header button:hover {
    color: #06B6D4;
    transform: scale(1.2) rotate(90deg);
}

.dark-mode .popup-header button {
    color: #CBD5E1;
}

.color-blind-mode .popup-header button {
    border: 2px solid #000000;
    padding: 4px 10px;
    border-radius: 6px;
}

.popup button {
    padding: 12px 24px;
    margin: 6px;
    cursor: pointer;
    border-radius: 12px;
    border: none;
    background: linear-gradient(135deg, #F1F5F9 0%, #E2E8F0 100%);
    color: #0F172A;
    font-size: 15px;
    font-weight: 700;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 12px rgba(6, 182, 212, 0.15);
}

.popup button:hover {
    background: linear-gradient(135deg, #E2E8F0 0%, #CBD5E1 100%);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(6, 182, 212, 0.3);
}

.dark-mode .popup button {
    background: linear-gradient(135deg, #1E293B 0%, #334155 100%) !important;
    color: #F1F5F9 !important;
}

.color-blind-mode .popup button {
    border: 3px solid #000000;
}

.popup button:not(.share-button) {
    font-size: 24px;
    border: 2px solid #CBD5E1;
    padding: 0 8px;
    background: linear-gradient(135deg, #FFFFFF 0%, #F8FAFC 100%);
}

/* Stats Grid with Gradient Numbers */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 35px;
    margin: 25px 0;
    text-align: center;
}

.stats-grid div {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.stats-grid div span:first-child {
    font-size: 56px;
    font-weight: 900;
    background: linear-gradient(135deg, #6AAA64, #538D4E, #C9B458);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 30px rgba(106, 170, 100, 0.3);
}

.dark-mode .stats-grid div span:first-child {
    background: linear-gradient(135deg, #8BC34A, #7CB342, #FFD54F);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stats-grid div span:last-child {
    font-size: 15px;
    text-transform: uppercase;
    color: #64748B;
    font-weight: 700;
    letter-spacing: 1px;
}

.dark-mode .stats-grid div span:last-child {
    color: #CBD5E1;
}

.color-blind-mode .stats-grid div span:last-child {
    color: #000000;
}

/* Guess Distribution */
.guess-distribution {
    margin-top: 25px;
    text-align: left;
}

.guess-distribution h3 {
    font-size: 18px;
    font-weight: 800;
    text-transform: uppercase;
    text-align: center;
    margin-bottom: 15px;
    color: #0F172A;
    letter-spacing: 1px;
}

.dark-mode .guess-distribution h3 {
    color: #F1F5F9;
}

.color-blind-mode .guess-distribution h3 {
    color: #000000;
}

.guess-distribution .distribution-row {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.guess-distribution .distribution-row span:first-child {
    width: 25px;
    font-size: 16px;
    font-weight: 700;
    color: #0F172A;
}

.dark-mode .guess-distribution .distribution-row span:first-child {
    color: #F1F5F9;
}

.color-blind-mode .guess-distribution .distribution-row span:first-child {
    color: #000000;
}

.guess-distribution .bar-container {
    flex: 1;
    height: 28px;
    background-color: #E2E8F0;
    border-radius: 14px;
    overflow: hidden;
    margin: 0 12px;
    position: relative;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.dark-mode .guess-distribution .bar-container {
    background-color: #334155;
}

.color-blind-mode .guess-distribution .bar-container {
    background-color: #d3d3d3;
    border: 2px solid #000000;
}

.guess-distribution .bar {
    height: 100%;
    background: linear-gradient(90deg, #6AAA64 0%, #538D4E 100%);
    transition: width 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    box-shadow: 0 0 15px rgba(106, 170, 100, 0.5);
}

.color-blind-mode .guess-distribution .bar {
    background-color: #1e90ff;
}

.guess-distribution .bar::after {
    content: attr(data-percentage) "%";
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-size: 13px;
    font-weight: bold;
    display: none;
}

.guess-distribution .bar.wide-enough::after {
    display: block;
}

.guess-distribution .distribution-row span:last-child {
    width: 35px;
    font-size: 16px;
    font-weight: 700;
    color: #0F172A;
}

.dark-mode .guess-distribution .distribution-row span:last-child {
    color: #F1F5F9;
}

.color-blind-mode .guess-distribution .distribution-row span:last-child {
    color: #000000;
}

/* Share Button with Neon Effect */
.share-button {
    margin-top: 25px !important;
    color: #fff !important;
    background: linear-gradient(135deg, #6AAA64 0%, #538D4E 50%, #C9B458 100%) !important;
    cursor: pointer;
    font-size: 17px !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
    box-shadow: 0 6px 20px rgba(106, 170, 100, 0.5), 0 0 20px rgba(106, 170, 100, 0.3);
    letter-spacing: 1px;
}

.share-button:hover {
    background: linear-gradient(135deg, #538D4E 0%, #C9B458 50%, #6AAA64 100%) !important;
    transform: translateY(-3px) scale(1.02) !important;
    box-shadow: 0 8px 30px rgba(106, 170, 100, 0.7), 0 0 40px rgba(106, 170, 100, 0.5) !important;
}

.dark-mode .share-button {
    background: linear-gradient(135deg, #538D4E 0%, #6AAA64 100%) !important;
}

.color-blind-mode .share-button {
    background-color: #1e90ff !important;
    border: 3px solid #000000;
    color: #ffffff !important;
}

/* Overlay with Enhanced Blur */
.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 17, 40, 0.8);
    backdrop-filter: blur(8px);
    z-index: 999;
}

.color-blind-mode .overlay {
    background: rgba(0,0,0,0.8);
}

/* Navigation Buttons - New Design */
.nav-buttons {
    top: 15px;
    right: 100px;
    display: flex;
    justify-content: end;
    position: absolute;
    gap: 15px;
    z-index: 10;
}

.nav-buttons .nav-icon {
    width: 30px;
    height: 30px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    filter: drop-shadow(0 3px 10px rgba(6, 182, 212, 0.4));
    padding: 8px;
    margin-bottom: 20px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    border: 2px solid rgba(6, 182, 212, 0.3);
}

.nav-buttons .nav-icon:hover {
    transform: translateY(-5px) scale(1.1);
    filter: drop-shadow(0 8px 25px rgba(6, 182, 212, 0.8)) drop-shadow(0 0 20px rgba(244, 114, 182, 0.6));
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(6, 182, 212, 0.6);
}

.nav-buttons .nav-icon:active {
    transform: translateY(-2px) scale(1.05);
}

/* Special Keys - Enter & Backspace */
.key-enter,
.key-backspace {
    background: linear-gradient(135deg, #6AAA64 0%, #538D4E 100%) !important;
    color: #FFFFFF !important;
    padding: 12px 16px !important;
    width: auto;
    font-weight: 800 !important;
    box-shadow: 0 6px 20px rgba(106, 170, 100, 0.5), 0 0 15px rgba(106, 170, 100, 0.3);
}

.key-enter:hover,
.key-backspace:hover {
    background: linear-gradient(135deg, #538D4E 0%, #6AAA64 100%) !important;
    transform: translateY(-4px) scale(1.05) !important;
    box-shadow: 0 8px 30px rgba(106, 170, 100, 0.7), 0 0 25px rgba(106, 170, 100, 0.5) !important;
}

.key-enter {
    min-width: 95px !important;
}

.key-backspace {
    min-width: 85px !important;
}

.dark-mode .key-backspace, .dark-mode .key-enter {
    background: linear-gradient(135deg, #538D4E 0%, #6AAA64 100%) !important;
}

.color-blind-mode .key-backspace, .color-blind-mode .key-enter {
    background-color: #000000 !important;
    color: #ffffff !important;
    border: 3px solid #ffffff;
}

/* Settings Popup */
#settings p {
    font-size: 17px;
    font-weight: 800;
    margin: 12px 0 6px;
    color: #0F172A;
}

.dark-mode #settings p {
    color: #F1F5F9;
}

.color-blind-mode #settings p {
    color: #000000;
}

#settings .letter-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-bottom: 25px;
}

#settings .letter-buttons button {
    padding: 12px 24px;
    min-width: 85px;
    height: auto;
    font-size: 15px;
    font-weight: 700;
    border: 2px solid #E2E8F0;
    border-radius: 12px;
    background: linear-gradient(135deg, #FFFFFF 0%, #F8FAFC 100%);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    justify-content: center;
    align-items: center;
}

#settings .letter-buttons button:hover {
    background: linear-gradient(135deg, #F8FAFC 0%, #E2E8F0 100%);
    border-color: #06B6D4;
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(6, 182, 212, 0.3);
}

.dark-mode #settings .letter-buttons button {
    background: linear-gradient(135deg, #1E293B 0%, #334155 100%);
    border-color: #334155;
    color: #F1F5F9;
}

.color-blind-mode #settings .letter-buttons button {
    background-color: #ffffff;
    border: 3px solid #000000;
    color: #000000;
}

#settings .letter-buttons button.active {
    background: linear-gradient(135deg, #6AAA64 0%, #538D4E 100%) !important;
    color: white;
    border-color: #6AAA64;
    box-shadow: 0 6px 20px rgba(106, 170, 100, 0.5), 0 0 15px rgba(106, 170, 100, 0.3);
}

.color-blind-mode #settings .letter-buttons button.active {
    background-color: #1e90ff !important;
    border-color: #000000;
    color: #ffffff;
}

#settings .setting-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 18px 0;
    gap: 12px;
}

#settings .setting-option label {
    font-size: 17px;
    font-weight: 800;
    color: #0F172A;
    display: flex;
}

.dark-mode #settings .setting-option label {
    color: #F1F5F9;
}

#settings .setting-option p {
    font-size: 15px;
    font-weight: normal;
    margin: 6px 0 0;
    color: #64748B;
    text-align: left;
}

.dark-mode #settings .setting-option p {
    color: #CBD5E1;
}

#settings .setting-option input[type="checkbox"] {
    display: none;
}

#settings .setting-option .toggle-switch {
    position: relative;
    width: 56px;
    min-width: 56px;
    height: 28px;
    background-color: #CBD5E1;
    border-radius: 14px;
    cursor: pointer;
    transition: background-color 0.3s;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.color-blind-mode #settings .setting-option .toggle-switch {
    background-color: #d3d3d3;
    border: 2px solid #000000;
}

#settings .setting-option .toggle-switch::before {
    content: '';
    position: absolute;
    width: 22px;
    height: 22px;
    background-color: white;
    border-radius: 50%;
    top: 3px;
    left: 3px;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
}

#settings .setting-option input[type="checkbox"]:checked + .toggle-switch {
    background: linear-gradient(90deg, #6AAA64 0%, #538D4E 100%);
    box-shadow: 0 0 15px rgba(106, 170, 100, 0.5);
}

.color-blind-mode #settings .setting-option input[type="checkbox"]:checked + .toggle-switch {
    background-color: #1e90ff;
    border-color: #000000;
}

#settings .setting-option input[type="checkbox"]:checked + .toggle-switch::before {
    transform: translateX(28px);
}

/* Lose Popup */
.popup#lose {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(30px);
    border-radius: 24px;
    padding: 0;
    max-width: 440px;
    width: 100%;
    box-shadow: 0 25px 80px rgba(244, 114, 182, 0.4);
}

.dark-mode .popup#lose {
    background: rgba(15, 23, 42, 0.9);
}

.color-blind-mode .popup#lose {
    border: 3px solid #000000;
}

.popup#lose .popup-header {
    background: linear-gradient(135deg, #C9B458 0%, #B59F3B 100%);
    color: #fff;
    padding: 25px;
    border-top-left-radius: 22px;
    border-top-right-radius: 22px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dark-mode .popup#lose .popup-header {
    background: linear-gradient(135deg, #B59F3B 0%, #A08735 100%);
}

.color-blind-mode .popup#lose .popup-header {
    border-bottom: 3px solid #ffffff;
}

.popup#lose .popup-header h3 {
    font-size: 22px;
    font-weight: 900;
    margin: 0;
    letter-spacing: 1px;
}

.popup#lose .popup-header button {
    background: none;
    border: 2px solid #fff;
    font-size: 18px;
    cursor: pointer;
    color: #fff;
    transition: all 0.3s ease;
}

.popup#lose .popup-header button:hover {
    transform: scale(1.15) rotate(90deg);
}

.dark-mode .popup#lose .popup-header button {
    color: #F1F5F9;
}

.color-blind-mode .popup#lose .popup-header button {
    border: 2px solid #ffffff;
    padding: 4px 10px;
    border-radius: 6px;
}

.popup#lose .popup-grid {
    margin: 25px auto;
    display: flex !important;
    justify-content: center;
    gap: 6px;
    width: 95%;
    grid-template-rows: none !important;
    height: auto !important;
    min-height: auto !important;
}

.popup#lose .popup-grid .tile {
    width: 34px;
    height: 34px;
    font-size: 18px;
    line-height: 34px;
    background: linear-gradient(135deg, #6AAA64 0%, #538D4E 100%);
    color: white;
    border-color: #6AAA64;
}

.color-blind-mode .popup#lose .popup-grid .tile {
    background-color: #6AAA64;
    border-color: #000000;
    color: #ffffff;
}

.popup#lose .popup-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 25px;
    align-items: center;
}

.popup#lose .popup-buttons button {
    width: 240px;
    padding: 12px;
    font-size: 17px;
    font-weight: 700;
    border-radius: 14px;
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.popup#lose .reveal-button {
    background: linear-gradient(135deg, #64748B 0%, #475569 100%);
    color: #fff;
}

.popup#lose .reveal-button:hover {
    background: linear-gradient(135deg, #475569 0%, #334155 100%);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(100, 116, 139, 0.4);
}

.dark-mode .popup#lose .reveal-button {
    background: linear-gradient(135deg, #475569 0%, #64748B 100%);
}

.color-blind-mode .popup#lose .reveal-button {
    border: 3px solid #ffffff;
}

.popup#lose .play-again-button {
    background: linear-gradient(135deg, #6AAA64 0%, #538D4E 100%);
    color: #fff;
    box-shadow: 0 6px 20px rgba(106, 170, 100, 0.5), 0 0 15px rgba(106, 170, 100, 0.3);
}

.popup#lose .play-again-button:hover {
    background: linear-gradient(135deg, #538D4E 0%, #6AAA64 100%);
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(106, 170, 100, 0.7), 0 0 25px rgba(106, 170, 100, 0.5);
}

.dark-mode .popup#lose .play-again-button {
    background: linear-gradient(135deg, #538D4E 0%, #6AAA64 100%);
}

.color-blind-mode .popup#lose .play-again-button {
    background-color: #1e90ff;
    border: 3px solid #000000;
}

.popup#lose .download-button {
    background: linear-gradient(135deg, #F1F5F9 0%, #E2E8F0 100%);
    color: #0F172A;
}

.popup#lose .download-button:hover {
    background: linear-gradient(135deg, #E2E8F0 0%, #CBD5E1 100%);
    transform: translateY(-3px);
}

.dark-mode .popup#lose .download-button, .dark-mode .popup#win .popup-buttons .download-button {
    background: linear-gradient(135deg, #1E293B 0%, #334155 100%);
    color: #F1F5F9;
}

.color-blind-mode .popup#lose .download-button, .color-blind-mode .popup#win .popup-buttons .download-button {
    border: 3px solid #000000;
}

/* Win Popup */
.popup#win {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(30px);
    border-radius: 24px;
    padding: 0;
    max-width: 440px;
    width: 100%;
    box-shadow: 0 25px 80px rgba(6, 182, 212, 0.5);
}

.dark-mode .popup#win {
    background: rgba(15, 23, 42, 0.9);
}

.color-blind-mode .popup#win {
    border: 3px solid #000000;
}

.popup#win .popup-header {
    background: linear-gradient(135deg, #6AAA64 0%, #538D4E 50%, #C9B458 100%);
    color: #fff;
    padding: 25px;
    border-top-left-radius: 22px;
    border-top-right-radius: 22px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dark-mode .popup#win .popup-header {
    background: linear-gradient(135deg, #538D4E 0%, #6AAA64 50%, #C9B458 100%);
}

.color-blind-mode .popup#win .popup-header {
    border-bottom: 3px solid #ffffff;
}

.popup#win .popup-header h2 {
    margin: 0;
    font-size: 32px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #fff !important;
    background: none !important;
    -webkit-background-clip: unset !important;
    -webkit-text-fill-color: #fff !important;
}

.popup#win .popup-header button {
    background: none;
    border: 2px solid #fff;
    font-size: 18px;
    cursor: pointer;
    color: #fff;
    transition: all 0.3s ease;
}

.popup#win .popup-header button:hover {
    transform: scale(1.15) rotate(90deg);
}

.dark-mode .popup#win .popup-header button {
    color: #F1F5F9;
}

.color-blind-mode .popup#win .popup-header button {
    border: 2px solid #ffffff;
    padding: 4px 10px;
    border-radius: 6px;
}

.popup#win .popup-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 25px;
    align-items: center;
}

.popup#win .popup-buttons .play-again-button {
    background: linear-gradient(135deg, #6AAA64 0%, #538D4E 100%);
    color: #fff;
    width: 240px;
    padding: 12px;
    font-size: 17px;
    font-weight: 700;
    border-radius: 14px;
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 6px 20px rgba(106, 170, 100, 0.5), 0 0 15px rgba(106, 170, 100, 0.3);
}

.popup#win .popup-buttons .play-again-button:hover {
    background: linear-gradient(135deg, #538D4E 0%, #6AAA64 100%);
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(106, 170, 100, 0.7), 0 0 25px rgba(106, 170, 100, 0.5);
}

.dark-mode .popup#win .popup-buttons .play-again-button {
    background: linear-gradient(135deg, #538D4E 0%, #6AAA64 100%);
}

.color-blind-mode .popup#win .popup-buttons .play-again-button {
    background-color: #1e90ff;
    border: 3px solid #000000;
}

.popup#win .popup-buttons .copy-button {
    background: linear-gradient(135deg, #F1F5F9 0%, #E2E8F0 100%);
    color: #0F172A;
    width: 240px;
    padding: 12px;
    font-size: 17px;
    font-weight: 700;
    border-radius: 14px;
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.popup#win .popup-buttons .copy-button:hover {
    background: linear-gradient(135deg, #E2E8F0 0%, #CBD5E1 100%);
    transform: translateY(-3px);
}

.dark-mode .popup#win .popup-buttons .copy-button {
    background: linear-gradient(135deg, #1E293B 0%, #334155 100%);
    color: #F1F5F9;
}

.color-blind-mode .popup#win .popup-buttons .copy-button {
    border: 3px solid #000000;
}

.popup#win .popup-buttons .download-button {
    background: linear-gradient(135deg, #F1F5F9 0%, #E2E8F0 100%);
    color: #0F172A;
    width: 240px;
    padding: 12px;
    font-size: 17px;
    font-weight: 700;
    border-radius: 14px;
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.popup#win .popup-buttons .download-button:hover {
    background: linear-gradient(135deg, #E2E8F0 0%, #CBD5E1 100%);
    transform: translateY(-3px);
}

/* Custom Alert */
.custom-alert {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.3);
    background: linear-gradient(135deg, #6AAA64 0%, #538D4E 100%);
    color: white;
    padding: 18px 30px;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(106, 170, 100, 0.6), 0 0 20px rgba(106, 170, 100, 0.4);
    font-family: 'Inter', sans-serif;
    font-size: 17px;
    font-weight: 700;
    z-index: 1000;
    transition: transform 0.05s ease-out, opacity 0.05s ease-out;
    cursor: pointer;
    opacity: 0;
    display: none;
}

.custom-alert.show {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
    display: block;
}

.custom-alert:hover {
    background: linear-gradient(135deg, #538D4E 0%, #6AAA64 100%);
    box-shadow: 0 12px 40px rgba(106, 170, 100, 0.8), 0 0 30px rgba(106, 170, 100, 0.6);
}

body.dark-mode .custom-alert {
    background: linear-gradient(135deg, #538D4E 0%, #6AAA64 100%);
}

body.dark-mode .custom-alert:hover {
    background: linear-gradient(135deg, #6AAA64 0%, #538D4E 100%);
}

.popup#win .popup-buttons .share-button {
    background: linear-gradient(135deg, #6AAA64 0%, #538D4E 50%, #C9B458 100%) !important;
    color: #fff !important;
    width: 240px;
    padding: 12px;
    font-size: 17px;
    font-weight: 800 !important;
    border-radius: 14px;
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    margin-top: 8px !important;
    box-shadow: 0 6px 20px rgba(106, 170, 100, 0.5), 0 0 20px rgba(106, 170, 100, 0.3);
    letter-spacing: 1px;
}

.popup#win .popup-buttons .share-button:hover {
    background: linear-gradient(135deg, #538D4E 0%, #C9B458 50%, #6AAA64 100%) !important;
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(106, 170, 100, 0.7), 0 0 40px rgba(106, 170, 100, 0.5);
}

.dark-mode .popup#win .popup-buttons .share-button {
    background: linear-gradient(135deg, #538D4E 0%, #6AAA64 100%) !important;
}

.color-blind-mode .popup#win .popup-buttons .share-button {
    border: 3px solid #000000;
}

/* Confetti Animation */
.confetti-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
}

.confetti {
    position: absolute;
    width: 12px;
    height: 12px;
    background: linear-gradient(45deg, #6AAA64, #C9B458, #538D4E);
    animation: fall 3.5s linear forwards;
    box-shadow: 0 0 10px currentColor;
}

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

/* Win Message */
.win-message {
    text-align: center;
    font-size: 16px;
    font-weight: 800;
    color: #fff;
    border-radius: 16px;
    background: linear-gradient(135deg, #6AAA64 0%, #538D4E 100%);
    padding: 12px 25px;
    animation: fadeInOut 3.5s forwards;
    box-shadow: 0 6px 20px rgba(106, 170, 100, 0.6), 0 0 20px rgba(106, 170, 100, 0.4);
    letter-spacing: 1px;
}

@keyframes fadeInOut {
    0% { opacity: 0; transform: translateY(-15px) scale(0.9); }
    20% { opacity: 1; transform: translateY(0) scale(1); }
    80% { opacity: 1; transform: translateY(0) scale(1); }
    100% { opacity: 0; transform: translateY(-15px) scale(0.9); }
}

/* Play Again Button */
.play-again-button {
    display: block;
    margin: 0 auto;
    padding: 12px 28px;
    font-size: 17px;
    font-weight: 800;
    color: white;
    background: linear-gradient(135deg, #6AAA64 0%, #538D4E 100%);
    border: none;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 6px 20px rgba(106, 170, 100, 0.5), 0 0 15px rgba(106, 170, 100, 0.3);
    letter-spacing: 1px;
}

.play-again-button:hover {
    background: linear-gradient(135deg, #538D4E 0%, #6AAA64 100%);
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 30px rgba(106, 170, 100, 0.7), 0 0 25px rgba(106, 170, 100, 0.5);
}

/* Responsive Design */
@media screen and (max-width: 1024px) {
    .nav-buttons {
        right: 50px;
    }
}

@media screen and (max-width: 768px) {
    .keyboard {
        display: flex;
        flex-direction: column;
        gap: 6px;
        align-items: center;
        padding: 10px 8px;
        width: 100%;
        max-width: 500px;
        margin: 0 auto;
    }

    .keyboard-row {
        display: flex;
        justify-content: center;
        gap: 5px;
        width: 100%;
        flex-wrap: nowrap;
    }

    .keyboard-row:nth-child(2) {
        padding: 0 20px;
    }

    .key {
        flex: 1;
        min-width: 0;
        max-width: 40px;
        height: 50px;
        font-size: 13px;
        padding: 8px 2px;
        border-radius: 4px;
    }

    .key-enter,
    .key-backspace {
        flex: 1.5;
        max-width: 65px;
        font-size: 12px;
        padding: 8px 4px !important;
        min-width: 0 !important;
    }

    .popup {
        width: 300px;
    }

    .nav-buttons {
        position: relative;
    }
}

@media screen and (max-width: 480px) {
    .keyboard {
        gap: 4px;
        padding: 8px;
    }

    .keyboard-row {
        gap: 3px;
    }

    .keyboard-row:nth-child(2) {
        padding: 0 10px;
    }

    .key {
        flex: 1;
        min-width: 0;
        max-width: 32px;
        height: 45px;
        font-size: 12px;
        padding: 6px 1px;
    }

    .key-enter,
    .key-backspace {
        flex: 1.5;
        max-width: 55px;
        font-size: 11px;
        padding: 6px 3px !important;
    }
}

@media screen and (max-width: 375px) {
    .keyboard-row {
        gap: 2px;
    }

    .keyboard-row:nth-child(2) {
        padding: 0 8px;
    }

    .key {
        flex: 1;
        min-width: 0;
        max-width: 28px;
        height: 42px;
        font-size: 11px;
        padding: 5px 0;
    }

    .key-enter,
    .key-backspace {
        flex: 1.5;
        max-width: 48px;
        font-size: 10px;
        padding: 5px 2px !important;
    }
}

@media screen and (max-width: 320px) {
    .container {
        padding: 5px;
    }

    .popup {
        width: 260px;
    }

    .keyboard {
        gap: 3px;
        padding: 5px;
    }

    .keyboard-row {
        gap: 2px;
    }

    .keyboard-row:nth-child(2) {
        padding: 0 8px;
    }

    .key {
        flex: 1;
        min-width: 0;
        max-width: 26px;
        height: 40px;
        font-size: 10px;
        padding: 4px 0;
    }

    .key-enter,
    .key-backspace {
        flex: 1.5;
        max-width: 44px;
        font-size: 9px;
        padding: 4px 2px !important;
    }

    #settings .letter-buttons button {
        padding: 8px 15px;
        min-width: 70px;
        font-size: 12px;
    }

    #settings .setting-option label {
        font-size: 14px;
    }

    #settings .setting-option p {
        font-size: 12px;
    }
}

/* ============================================
   CONTENT SECTIONS - Cosmic Theme with Cards
   ============================================ */

.tool-content-section {
    padding: 60px 0;
    background: linear-gradient(180deg, #F0F9FF 0%, #FFFFFF 50%, #FDF2F8 100%);
    position: relative;
}

.tool-content-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 30%, rgba(6, 182, 212, 0.05) 0%, transparent 50%),
                radial-gradient(circle at 80% 70%, rgba(244, 114, 182, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

.dark-mode .tool-content-section {
    background: linear-gradient(180deg, #0A1128 0%, #1E3A8A 50%, #1E293B 100%);
}

.section-title {
    font-size: 48px;
    font-weight: 900;
    text-align: center;
    background: linear-gradient(135deg, #06B6D4, #0EA5E9, #F472B6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 15px;
    letter-spacing: 2px;
}

.dark-mode .section-title {
    background: linear-gradient(135deg, #0EA5E9, #06B6D4, #F472B6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-subtitle {
    font-size: 20px;
    color: #64748B;
    text-align: center;
    margin: 0 auto 50px;
    border-bottom: 3px solid transparent;
    border-image: linear-gradient(90deg, transparent, #06B6D4, #F472B6, transparent);
    border-image-slice: 1;
    padding-bottom: 50px;
}

.dark-mode .section-subtitle {
    color: #CBD5E1;
}

/* Enhanced Content Cards */
.content-block {
    display: flex;
    align-items: center;
    gap: 50px;
    margin-bottom: 70px;
    padding: 40px;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    border-radius: 28px;
    border: 2px solid rgba(6, 182, 212, 0.15);
    box-shadow: 0 10px 40px rgba(6, 182, 212, 0.15);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.content-block::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(6, 182, 212, 0.1), transparent);
    transition: left 0.7s ease;
}

.content-block:hover::before {
    left: 100%;
}

.content-block:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 60px rgba(6, 182, 212, 0.25), 0 0 40px rgba(6, 182, 212, 0.1);
    border-color: rgba(6, 182, 212, 0.3);
}

.dark-mode .content-block {
    background: rgba(30, 41, 59, 0.7);
    border-color: rgba(6, 182, 212, 0.2);
}

.content-block.reverse {
    flex-direction: row-reverse;
}

.content-block .text-block {
    flex: 1;
    position: relative;
    z-index: 1;
}

.content-block .text-block h2 {
    font-size: 34px;
    font-weight: 900;
    color: #0F172A;
    margin-bottom: 20px;
    letter-spacing: 1px;
    position: relative;
    display: inline-block;
}

.content-block .text-block h2::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 60%;
    height: 4px;
    background: linear-gradient(90deg, #06B6D4, #F472B6);
    border-radius: 2px;
}

.dark-mode .content-block .text-block h2 {
    color: #F1F5F9;
}

.content-block .text-block p {
    font-size: 19px;
    color: #64748B;
    line-height: 1.8;
}

.dark-mode .content-block .text-block p {
    color: #CBD5E1;
}

.content-block .image-block {
    flex: 1;
    position: relative;
}

.content-block .image-block img {
    width: 100%;
    max-width: 500px;
    height: auto;
    border-radius: 24px;
    box-shadow: 0 15px 50px rgba(6, 182, 212, 0.3), 0 0 30px rgba(6, 182, 212, 0.15);
    transition: all 0.4s ease;
}

.content-block:hover .image-block img {
    transform: scale(1.02) rotate(1deg);
    box-shadow: 0 20px 60px rgba(6, 182, 212, 0.4), 0 0 40px rgba(6, 182, 212, 0.2);
}

.how-to-play {
    margin-bottom: 70px;
}

.how-to-play h2 {
    font-size: 32px;
    font-weight: 900;
    text-align: center;
    color: #0F172A;
    margin-bottom: 50px;
    letter-spacing: 1px;
}

.dark-mode .how-to-play h2 {
    color: #F1F5F9;
}

.step {
    display: flex;
    align-items: center;
    /* gap: 40px; */
    margin-bottom: 50px;
    flex-direction: column;
}

.step.reverse {
    flex-direction: row-reverse;
}

.step-text {
    flex: 1;
}

.step-text h3 {
    font-size: 24px;
    font-weight: 800;
    color: #0F172A;
    margin-bottom: 12px;
}

.dark-mode .step-text h3 {
    color: #F1F5F9;
}

.step-text p {
    font-size: 19px;
    color: #64748B;
    line-height: 1.7;
}

.dark-mode .step-text p {
    color: #CBD5E1;
}

.step-image {
    flex: 1;
}

.step-image img {
    width: max-content;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(6, 182, 212, 0.25), 0 0 20px rgba(6, 182, 212, 0.1);
}

@media screen and (max-width: 768px) {
    .content-block, .step {
        flex-direction: column;
        gap: 25px;
    }

    .step-image img, .content-block .image-block img {
        max-width: 280px;
        width: 100%;
    }

    .content-block.reverse, .step.reverse {
        flex-direction: column;
    }

    .section-title {
        font-size: 32px;
    }

    .content-block .text-block h2, .how-to-play h2, .tips h2 {
        font-size: 26px;
    }

    .step-text h3 {
        font-size: 20px;
    }
}

@media screen and (max-width: 320px) {
    .tool-content-section {
        padding: 25px 0;
    }
}

/* Benefits & Tips Section */
.benefits-tips {
    background: linear-gradient(135deg, #0EA5E9 0%, #06B6D4 50%, #F472B6 100%);
    padding: 70px 0;
    border-radius: 0;
    position: relative;
    overflow: hidden;
}

.benefits-tips::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 35px,
        rgba(255, 255, 255, 0.05) 35px,
        rgba(255, 255, 255, 0.05) 70px
    );
    opacity: 0.4;
}

.benefits-tips .left-section-img, .benefits-tips .right-section-img {
    z-index: 0 !important;
    opacity: 0.15;
}

.benefits-tips .container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 25px;
    position: relative;
    z-index: 1;
}

.benefits-tips-content {
    display: flex;
    gap: 15px;
    margin-bottom: 50px;
}

.benefits, .tips {
    flex: 1;
    padding: 25px;
    border-radius: 20px;
}

.benefits h2, .tips h2 {
    font-size: 32px;
    font-weight: 900;
    color: #fff;
    margin-bottom: 25px;
    text-align: left;
    letter-spacing: 1px;
}

.benefits ul, .tips ul {
    list-style: none;
    padding: 0;
}

.benefits ul li, .tips ul li {
    font-size: 19px;
    color: #F1F5F9;
    line-height: 1.7;
    margin-bottom: 18px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(15px);
    border-radius: 16px;
    position: relative;
    padding: 35px 15px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.benefits ul li:hover, .tips ul li:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateX(8px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3), 0 0 20px rgba(255, 255, 255, 0.2);
}

.benifits-left {
    border-right: 2px solid rgba(255, 255, 255, 0.3);
    padding-right: 35px;
    border-radius: 0;
}

.benefits ul li strong {
    color: #fff;
    font-weight: 900;
}

/* Popularity Section */
.popularity-section {
    background-color: #fff;
    padding: 25px;
    text-align: center;
    margin-bottom: 20px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(6, 182, 212, 0.2);
}

.dark-mode .popularity-section {
    background: linear-gradient(135deg, #1E293B 0%, #0F172A 100%);
}

.popularity-section h2 {
    font-size: 32px;
    font-weight: 900;
    color: #0F172A;
    margin-bottom: 25px;
    text-align: left !important;
    letter-spacing: 1px;
}

.dark-mode .popularity-section h2 {
    color: #F1F5F9;
}

.popularity-section p {
    text-align: left !important;
    color: #64748B;
}

.dark-mode .popularity-section p {
    color: #CBD5E1;
}

.trophy-image img {
    width: 160px;
    height: auto;
}

/* FAQ Section */
.faq-section {
    background-color: #fff;
    padding: 50px 25px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(6, 182, 212, 0.2);
}

.dark-mode .faq-section {
    background: linear-gradient(135deg, #1E293B 0%, #0F172A 100%);
}

.faq-section h2 {
    font-size: 32px;
    font-weight: 900;
    color: #0F172A;
    margin-bottom: 25px;
    text-align: center;
    letter-spacing: 1px;
}

.dark-mode .faq-section h2 {
    color: #F1F5F9;
}

.faq-section ul {
    list-style: none;
    padding: 0;
}

.faq-section ul li {
    font-size: 19px;
    color: #64748B;
    line-height: 1.7;
    margin-bottom: 25px;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.dark-mode .faq-section ul li {
    color: #CBD5E1;
}

.faq-section ul li strong {
    color: #0F172A;
    font-weight: 800;
}

.dark-mode .faq-section ul li strong {
    color: #F1F5F9;
}

/* Hint Button */
.hint-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 15px auto 0;
    padding: 12px 24px;
    background: linear-gradient(135deg, #06B6D4 0%, #0EA5E9 100%);
    color: white;
    border: 2px solid transparent;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 15px rgba(6, 182, 212, 0.3);
}

.hint-button:hover {
    background: linear-gradient(135deg, #0EA5E9 0%, #06B6D4 100%);
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 25px rgba(6, 182, 212, 0.5);
}

.hint-button:active {
    transform: translateY(0) scale(0.98);
}

.hint-button:disabled {
    background: linear-gradient(135deg, #64748B 0%, #475569 100%);
    cursor: not-allowed;
    opacity: 0.6;
    box-shadow: none;
}

.dark-mode .hint-button {
    background: linear-gradient(135deg, #0EA5E9 0%, #06B6D4 100%);
}

.dark-mode .hint-button:hover {
    background: linear-gradient(135deg, #06B6D4 0%, #0EA5E9 100%);
}

/* Hint Popup */
.popup#hint-popup {
    max-width: 380px;
    width: 90%;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    border: none;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(30px);
}

.dark-mode .popup#hint-popup {
    background: rgba(15, 23, 42, 0.95);
}

.hint-grid {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin: 0 auto 30px;
}

.hint-tile {
    width: 55px;
    height: 55px;
    border: 3px solid #d3d6da;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: 8px;
    background: #fff;
    color: #2C363D;
    box-sizing: border-box;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.dark-mode .hint-tile {
    background-color: #2C363D;
    color: #e0e0e0;
    border-color: #555;
}

.color-blind-mode .hint-tile {
    border: 2px solid #000000;
}

.hint-tile.revealed {
    background-color: #56B836;
    color: white;
    border-color: #56B836;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(86, 184, 54, 0.3);
}

.color-blind-mode .hint-tile.revealed {
    background-color: #1e90ff;
    border-color: #000000;
}

.hint-tile.correct {
    background-color: #56B836;
    color: white;
    border-color: #56B836;
    box-shadow: 0 4px 12px rgba(86, 184, 54, 0.3);
}

.color-blind-mode .hint-tile.correct {
    background-color: #1e90ff;
    border-color: #000000;
}

.hint-popup-buttons {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin: 0;
}

.reveal-hint-button, .hide-hint-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 18px 32px;
    border-radius: 12px;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 140px;
    flex: 1;
    max-width: 170px;
    height: 40px;
}

.reveal-hint-button {
    background: linear-gradient(135deg, #06B6D4 0%, #0EA5E9 100%) !important;
    color: white !important;
    border: none !important;
    box-shadow: 0 4px 15px rgba(6, 182, 212, 0.4) !important;
}

.hide-hint-button {
    background: white !important;
    color: #0F172A !important;
    border: 2px solid #06B6D4 !important;
    box-shadow: 0 4px 12px rgba(6, 182, 212, 0.2) !important;
}

.reveal-hint-button:hover:not(:disabled) {
    background: linear-gradient(135deg, #0EA5E9 0%, #06B6D4 100%) !important;
    color: white !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(6, 182, 212, 0.5) !important;
}

.hide-hint-button:hover:not(:disabled) {
    background: #F0F9FF !important;
    color: #0F172A !important;
    border-color: #0EA5E9 !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(6, 182, 212, 0.3) !important;
}

.reveal-hint-button:active:not(:disabled), .hide-hint-button:active:not(:disabled) {
    transform: translateY(0);
}

.reveal-hint-button:disabled {
    background: linear-gradient(135deg, #9ca3af 0%, #6b7280 100%) !important;
    color: white !important;
    cursor: not-allowed;
    opacity: 0.6;
    transform: none;
    box-shadow: none !important;
}

.dark-mode .reveal-hint-button {
    background-color: #444 !important;
    color: #e0e0e0 !important;
}

.dark-mode .hide-hint-button {
    background-color: #2C363D !important;
    color: #e0e0e0 !important;
    border-color: #555 !important;
}

.dark-mode .reveal-hint-button:hover:not(:disabled) {
    background-color: #555 !important;
    color: #e0e0e0 !important;
}

.dark-mode .hide-hint-button:hover:not(:disabled) {
    background-color: #3d4854 !important;
    color: #e0e0e0 !important;
    border-color: #666 !important;
}

.color-blind-mode .reveal-hint-button, .color-blind-mode .hide-hint-button {
    border: 2px solid #000000;
}

@media screen and (max-width: 480px) {
    .popup#hint-popup {
        padding: 25px 15px;
    }

    .hint-grid {
        gap: 6px;
        margin-bottom: 20px;
    }

    .hint-tile {
        width: 48px;
        height: 48px;
        font-size: 24px;
    }

    .hint-popup-buttons {
        gap: 10px;
        flex-direction: row;
    }

    .reveal-hint-button, .hide-hint-button {
        padding: 15px 20px;
        font-size: 15px;
        min-width: 120px;
        max-width: 150px;
        height: 50px;
    }
}

@media screen and (max-width: 768px) {
    .benefits-tips-content {
        flex-direction: column;
    }

    .benefits, .tips {
        padding: 18px;
    }

    .popularity-section, .faq-section {
        padding: 25px;
    }

    .popularity-section h2, .faq-section h2 {
        font-size: 22px;
    }

    .trophy-image img {
        width: 110px;
    }
}

@media screen and (max-width: 320px) {
    .benefits-tips {
        padding: 25px 0;
    }

    .benefits, .tips {
        padding: 12px;
    }

    .popularity-section, .faq-section {
        padding: 18px;
    }

    .popularity-section h2, .faq-section h2 {
        font-size: 20px;
    }

    .trophy-image img {
        width: 90px;
    }
}
