/* BOMBFINDER - Themes Stylesheet (Classic Winmine & Modern Glassmorphic Toggle) */

@font-face {
    font-family: 'MS Sans Serif';
    src: local('MS Sans Serif'), local('Tahoma'), local('Arial');
}

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

:root {
    --cell-size-easy: 40px;
    --cell-size-medium: 40px;
    --cell-size-hard: 40px;
}

/* Desktop Icons Styling */
.desktop-icons {
    position: absolute;
    top: 60px;
    left: 20px;
    display: flex;
    flex-direction: column;
    gap: 25px;
    z-index: 10;
}

.desktop-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 80px;
    cursor: pointer;
    text-align: center;
    user-select: none;
    -webkit-user-select: none;
}

.desktop-icon-img {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 6px;
}

.desktop-icon-img i {
    font-size: 2.2rem;
}

body.theme-win98 .desktop-icon-img i {
    color: #00ffff;
    filter: drop-shadow(1px 1px 0px #000000);
}

body.theme-win98 .icon-label {
    color: #ffffff;
    font-size: 0.75rem;
    font-family: 'MS Sans Serif', 'Tahoma', sans-serif;
    text-shadow: 1px 1px 1px #000000;
    padding: 2px 6px;
    border: 1px solid transparent;
}

/* Selected state highlight like real Win98 */
.desktop-icon:active .icon-label,
.desktop-icon.selected .icon-label {
    background-color: #000080;
    color: #ffffff;
    border: 1px dotted #ffff00;
}

/* Modern theme desktop icons */
body.theme-modern .desktop-icon-img i {
    color: rgba(255, 255, 255, 0.75);
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.4));
    transition: color 0.2s, transform 0.2s;
}

body.theme-modern .desktop-icon:hover .desktop-icon-img i {
    color: #06b6d4;
    transform: scale(1.1);
}

body.theme-modern .icon-label {
    color: rgba(248, 250, 252, 0.85);
    font-size: 0.8rem;
    font-family: 'Outfit', sans-serif;
    padding: 4px 10px;
    background: rgba(0, 0, 0, 0.25);
    border-radius: 8px;
    margin-top: 4px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(4px);
    transition: background 0.2s;
}

body.theme-modern .desktop-icon:hover .icon-label {
    background: rgba(6, 182, 212, 0.2);
    color: #ffffff;
    border-color: rgba(6, 182, 212, 0.3);
}

@media (max-width: 1250px) {
    .desktop-icons {
        display: none;
    }
}

/* ==========================================================================
   THEME 1: RETRO WINDOWS 98 (DEFAULT)
   ========================================================================== */
body.theme-win98 {
    background-color: #008080; /* Classic Desktop Teal */
    color: #000000;
    font-family: 'MS Sans Serif', 'Tahoma', sans-serif;
    padding-bottom: 40px; /* Space for taskbar */
    padding-top: 15px;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Windows 98 Taskbar */
body.theme-win98 .win98-taskbar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 30px;
    background: #c0c0c0;
    border-top: 2px solid #ffffff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 2px 4px;
    z-index: 9999;
    box-shadow: 0 -1px 0 #808080;
}

/* Start Button */
body.theme-win98 .start-btn {
    height: 22px;
    background: #c0c0c0;
    color: #000000;
    border-top: 2px solid #ffffff;
    border-left: 2px solid #ffffff;
    border-right: 2px solid #808080;
    border-bottom: 2px solid #808080;
    padding: 2px 6px;
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    font-size: 0.85rem;
}

body.theme-win98 .start-btn:active {
    border-top: 2px solid #808080;
    border-left: 2px solid #808080;
    border-right: 2px solid #ffffff;
    border-bottom: 2px solid #ffffff;
    padding: 3px 5px 1px 7px;
}

/* Start Menu Dropdown */
body.theme-win98 .start-menu-container {
    position: relative;
}

body.theme-win98 .start-menu {
    position: absolute;
    bottom: 30px;
    left: 4px;
    width: 180px;
    background: #c0c0c0;
    border-top: 2px solid #ffffff;
    border-left: 2px solid #ffffff;
    border-right: 2px solid #000000;
    border-bottom: 2px solid #000000;
    z-index: 10000;
    padding: 2px;
    display: flex;
    flex-direction: column;
}

body.theme-win98 .start-menu::before {
    content: "Windows 98";
    writing-mode: vertical-lr;
    transform: rotate(180deg);
    background: linear-gradient(180deg, #000080, #1084d0);
    color: #ffffff;
    font-weight: bold;
    font-size: 1.1rem;
    padding: 6px 4px;
    text-align: center;
    position: absolute;
    left: 2px;
    top: 2px;
    bottom: 2px;
    width: 24px;
}

body.theme-win98 .start-menu-item {
    padding: 6px 8px 6px 32px; /* Margin for left title bar */
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #000000;
}

body.theme-win98 .start-menu-item:hover {
    background: #000080;
    color: #ffffff;
}

body.theme-win98 .start-menu-item:hover i {
    color: #ffffff !important;
}

body.theme-win98 .start-menu-separator {
    height: 1px;
    background: #808080;
    border-bottom: 1px solid #ffffff;
    margin: 4px 2px 4px 32px;
}

/* Taskbar Task Buttons */
body.theme-win98 .taskbar-tasks {
    flex-grow: 1;
    display: flex;
    margin: 0 10px;
    gap: 4px;
}

body.theme-win98 .task-btn {
    height: 22px;
    max-width: 150px;
    width: 100%;
    background: #c0c0c0;
    border-top: 2px solid #ffffff;
    border-left: 2px solid #ffffff;
    border-right: 2px solid #808080;
    border-bottom: 2px solid #808080;
    padding: 2px 6px;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

body.theme-win98 .task-btn.active {
    background: #e0e0e0;
    border-top: 2px solid #808080;
    border-left: 2px solid #808080;
    border-right: 2px solid #ffffff;
    border-bottom: 2px solid #ffffff;
}

/* System Tray */
body.theme-win98 .taskbar-tray {
    border-top: 2px solid #808080;
    border-left: 2px solid #808080;
    border-right: 2px solid #ffffff;
    border-bottom: 2px solid #ffffff;
    background: #c0c0c0;
    padding: 2px 6px;
    display: flex;
    align-items: center;
    gap: 8px;
    height: 22px;
}

body.theme-win98 .tray-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 0.75rem;
    color: #000000;
    font-family: inherit;
    font-weight: bold;
}

body.theme-win98 .tray-btn:hover {
    color: #000080;
}

body.theme-win98 .tray-time {
    font-size: 0.8rem;
}

/* Layout Grid */
body.theme-win98 .app-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 10px;
}

body.theme-win98 .main-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    justify-content: center;
    align-items: start;
}

@media (min-width: 992px) {
    body.theme-win98 .main-layout {
        grid-template-columns: auto auto;
    }
}

/* ==========================================================================
   WINMINE WINDOW DESIGN
   ========================================================================== */
body.theme-win98 .winmine-window {
    background: #c0c0c0;
    border-top: 2px solid #ffffff;
    border-left: 2px solid #ffffff;
    border-right: 2px solid #808080;
    border-bottom: 2px solid #808080;
    padding: 3px;
    display: inline-block;
    min-width: 200px;
    margin: 0 auto;
}

/* Title Bar */
body.theme-win98 .winmine-title-bar {
    background: linear-gradient(90deg, #000080, #1084d0);
    color: #ffffff;
    padding: 2px 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: bold;
    font-size: 0.85rem;
}

body.theme-win98 .winmine-title {
    display: flex;
    align-items: center;
    gap: 4px;
}

body.theme-win98 .logo-accent-icon {
    color: #00ffff;
}

body.theme-win98 .winmine-controls {
    display: flex;
    gap: 2px;
}

body.theme-win98 .winmine-btn-control {
    background: #c0c0c0;
    border-top: 1px solid #ffffff;
    border-left: 1px solid #ffffff;
    border-right: 1px solid #808080;
    border-bottom: 1px solid #808080;
    width: 14px;
    height: 14px;
    font-size: 0.65rem;
    font-weight: bold;
    color: #000000;
    cursor: pointer;
    line-height: 12px;
}

body.theme-win98 .winmine-btn-control:active {
    border-top: 1px solid #808080;
    border-left: 1px solid #808080;
    border-right: 1px solid #ffffff;
    border-bottom: 1px solid #ffffff;
}

/* Menu Bar */
body.theme-win98 .winmine-menu-bar {
    display: flex;
    background: #c0c0c0;
    border-bottom: 1px solid #808080;
    padding: 2px 4px;
    font-size: 0.8rem;
    gap: 8px;
}

body.theme-win98 .menu-item {
    position: relative;
    cursor: pointer;
    padding: 2px 6px;
}

body.theme-win98 .menu-item:hover {
    background: #e0e0e0;
}

/* Dropdown Menus */
body.theme-win98 .menu-dropdown {
    position: absolute;
    top: 20px;
    left: 0;
    background: #c0c0c0;
    border-top: 1px solid #ffffff;
    border-left: 1px solid #ffffff;
    border-right: 2px solid #000000;
    border-bottom: 2px solid #000000;
    z-index: 10000;
    min-width: 160px;
    padding: 2px;
    display: flex;
    flex-direction: column;
}

body.theme-win98 .dropdown-item {
    padding: 4px 12px 4px 20px; /* space for checkmark */
    font-size: 0.8rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #000000;
}

body.theme-win98 .dropdown-item:hover {
    background: #000080;
    color: #ffffff;
}

body.theme-win98 .check-mark {
    position: absolute;
    left: 4px;
    font-weight: bold;
    color: #000;
}

body.theme-win98 .dropdown-item:hover .check-mark {
    color: #fff;
}

body.theme-win98 .dropdown-separator {
    height: 1px;
    background: #808080;
    border-bottom: 1px solid #ffffff;
    margin: 4px 1px;
}

/* Window Body Inner Box */
body.theme-win98 .winmine-body {
    background: #c0c0c0;
    border: 3px solid;
    border-color: #808080 #fff #fff #808080;
    padding: 6px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* Winmine Status Bar */
body.theme-win98 .winmine-status-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 2px solid;
    border-color: #808080 #fff #fff #808080;
    padding: 4px 6px;
    background: #c0c0c0;
}

/* LED Numbers Display */
body.theme-win98 .led-display {
    background: #000000;
    color: #ff0000;
    border: 1px solid;
    border-color: #808080 #fff #fff #808080;
    padding: 1px 6px;
    font-size: 1.6rem;
    font-family: 'Share Tech Mono', Courier, monospace;
    font-weight: bold;
    letter-spacing: 2px;
    line-height: 1;
}

/* Outset Smiley button */
body.theme-win98 .winmine-smiley {
    width: 26px;
    height: 26px;
    background: #c0c0c0;
    border-top: 2px solid #ffffff;
    border-left: 2px solid #ffffff;
    border-right: 2px solid #808080;
    border-bottom: 2px solid #808080;
    font-size: 15px;
    line-height: 22px;
    text-align: center;
    cursor: pointer;
    outline: none;
}

body.theme-win98 .winmine-smiley:active {
    border-top: 2px solid #808080;
    border-left: 2px solid #808080;
    border-right: 2px solid #ffffff;
    border-bottom: 2px solid #ffffff;
}

/* Board Outer border container */
body.theme-win98 .winmine-board-container {
    border: 3px solid;
    border-color: #808080 #fff #fff #808080;
    background: #c0c0c0;
    padding: 0;
    overflow: auto;
    max-width: 100%;
}

body.theme-win98 .board-grid {
    display: grid;
    gap: 0px;
    border: 1px solid #808080;
    width: max-content;
    height: max-content;
    margin: 0 auto;
}

/* Cell button styling */
body.theme-win98 .cell {
    background: #c0c0c0;
    border-top: 2px solid #ffffff;
    border-left: 2px solid #ffffff;
    border-right: 2px solid #808080;
    border-bottom: 2px solid #808080;
    font-family: 'Share Tech Mono', monospace;
    font-weight: bold;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    width: 40px;
    height: 40px;
}

/* Cell Keyboard Selector */
body.theme-win98 .cell.keyboard-selected {
    outline: 1px dotted #000000 !important;
    outline-offset: -3px !important;
}

/* Revealed Flat Cell */
body.theme-win98 .cell.revealed {
    background: #c0c0c0;
    border: 1px solid #808080; /* flat gray pressed down */
    cursor: default;
}

body.theme-win98 .cell.flagged {
    color: #ef4444;
}

body.theme-win98 .cell.exploded {
    background-color: #ff0000;
    color: #ffffff;
    border: 1px solid #808080;
}

body.theme-win98 .cell.mine {
    background: #c0c0c0;
    border: 1px solid #808080;
    color: #000000;
}

body.theme-win98 .cell.revealed-mine {
    background: #c0c0c0;
    border: 1px solid #808080;
    color: #ff0000;
}

/* Number colors matching original winmine */
body.theme-win98 .cell-1 { color: #0000ff; }
body.theme-win98 .cell-2 { color: #008000; }
body.theme-win98 .cell-3 { color: #ff0000; }
body.theme-win98 .cell-4 { color: #000080; }
body.theme-win98 .cell-5 { color: #800000; }
body.theme-win98 .cell-6 { color: #008080; }
body.theme-win98 .cell-7 { color: #000000; }
body.theme-win98 .cell-8 { color: #808080; }

/* Win98 Tabs Filter */
body.theme-win98 .tabs-bar {
    border-bottom: 2px solid #808080;
    padding-bottom: 0px;
    gap: 2px;
}

body.theme-win98 .btn-tab {
    background: #dcdcdc;
    color: #000000;
    border-top: 2px solid #ffffff;
    border-left: 2px solid #ffffff;
    border-right: 2px solid #808080;
    border-bottom: none;
    font-family: inherit;
    font-size: 0.8rem;
    padding: 3px 8px;
    cursor: pointer;
    border-radius: 0;
}

body.theme-win98 .btn-tab.active {
    background: #c0c0c0;
    border-top: 2px solid #ffffff;
    border-left: 2px solid #ffffff;
    border-right: 2px solid #808080;
    border-bottom: 2px solid #c0c0c0;
    position: relative;
    top: 2px;
    font-weight: bold;
    padding-bottom: 5px;
}

/* Win98 Leaderboard Window */
body.theme-win98 .leaderboard-container {
    background: #ffffff;
    min-height: 250px;
    padding: 4px;
}

body.theme-win98 .leaderboard-table th {
    background: #c0c0c0;
    border-bottom: 1px solid #808080;
    font-size: 0.8rem;
    font-weight: bold;
    padding: 4px;
    color: #000000;
}

body.theme-win98 .leaderboard-table td {
    padding: 4px;
    border-bottom: 1px solid #f0f0f0;
    color: #000000;
}

body.theme-win98 .rank-badge {
    background: #e0e0e0;
    color: #000000;
    font-size: 0.75rem;
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

body.theme-win98 .rank-1 .rank-badge { background: #ffff00; border: 1px solid #c0c000; }
body.theme-win98 .rank-2 .rank-badge { background: #c0c0c0; border: 1px solid #808080; }
body.theme-win98 .rank-3 .rank-badge { background: #ff8000; border: 1px solid #c04000; }

body.theme-win98 .badge-diff {
    font-size: 0.7rem;
    padding: 1px 4px;
    border-radius: 0;
}

body.theme-win98 .badge-diff-easy { background: #e0ffd0; color: #008000; border: 1px solid #a0d0a0; }
body.theme-win98 .badge-diff-medium { background: #fff0d0; color: #b07000; border: 1px solid #e0b080; }
body.theme-win98 .badge-diff-hard { background: #ffd0d0; color: #d00000; border: 1px solid #e0a0a0; }

/* Win98 Modals */
body.theme-win98 .modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 1rem;
}

body.theme-win98 .glass-modal {
    background: #c0c0c0;
    border-top: 2px solid #ffffff;
    border-left: 2px solid #ffffff;
    border-right: 2px solid #808080;
    border-bottom: 2px solid #808080;
    padding: 3px;
    max-width: 420px;
    width: 100%;
    box-shadow: 1px 1px 0px #000000;
    display: flex;
    flex-direction: column;
}

body.theme-win98 .glass-modal::before {
    display: none;
}

body.theme-win98 .win-icon,
body.theme-win98 .lose-icon,
body.theme-win98 .shortcut-icon,
body.theme-win98 .settings-icon {
    font-size: 2.5rem;
    color: #000080;
    display: block;
    margin: 0 auto;
}

body.theme-win98 .modal-header-win h2 {
    font-size: 1.2rem;
    font-weight: bold;
    text-align: center;
}

body.theme-win98 .modal-header-win p {
    color: #000000;
    font-size: 0.85rem;
    text-align: center;
}

body.theme-win98 .win-stat-row {
    background: #ffffff;
    border-top: 2px solid #808080;
    border-left: 2px solid #808080;
    border-right: 2px solid #ffffff;
    border-bottom: 2px solid #ffffff;
    padding: 6px;
    display: flex;
}

body.theme-win98 .win-stat {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

body.theme-win98 .win-stat .label {
    font-size: 0.7rem;
    color: #404040;
}

body.theme-win98 .win-stat .value {
    font-size: 1.2rem;
    font-weight: bold;
    color: #000080 !important;
}

body.theme-win98 .input-group {
    background: #ffffff;
    border-top: 2px solid #808080;
    border-left: 2px solid #808080;
    border-right: 2px solid #ffffff;
    border-bottom: 2px solid #ffffff;
    padding: 2px;
    display: flex;
}

body.theme-win98 .input-group input {
    color: #000000;
    border: none;
    outline: none;
    font-family: inherit;
    font-size: 0.9rem;
    padding: 2px;
    flex-grow: 1;
    background: transparent;
}

body.theme-win98 .btn-submit {
    background: #c0c0c0;
    color: #000000;
    border-top: 2px solid #ffffff;
    border-left: 2px solid #ffffff;
    border-right: 2px solid #808080;
    border-bottom: 2px solid #808080;
    font-weight: normal;
    padding: 2px 8px;
    cursor: pointer;
}

body.theme-win98 .btn-secondary-modal {
    background: #c0c0c0;
    color: #000000;
    border-top: 2px solid #ffffff;
    border-left: 2px solid #ffffff;
    border-right: 2px solid #808080;
    border-bottom: 2px solid #808080;
    padding: 4px 12px;
    cursor: pointer;
}

/* Win98 Generic Buttons */
body.theme-win98 .btn {
    background: #c0c0c0;
    color: #000000;
    border-top: 2px solid #ffffff;
    border-left: 2px solid #ffffff;
    border-right: 2px solid #808080;
    border-bottom: 2px solid #808080;
    font-family: inherit;
    font-size: 0.85rem;
    padding: 4px 16px;
    cursor: pointer;
    outline: none;
    display: inline-block;
    text-align: center;
}

body.theme-win98 .btn:active {
    border-top: 2px solid #808080;
    border-left: 2px solid #808080;
    border-right: 2px solid #ffffff;
    border-bottom: 2px solid #ffffff;
    padding: 5px 15px 3px 17px;
}

body.theme-win98 .btn-primary {
    font-weight: bold;
    box-shadow: 0 0 0 1px #000000;
}

body.theme-win98 .settings-group label {
    font-weight: bold;
    font-size: 0.85rem;
}

body.theme-win98 .settings-group input {
    width: 100%;
    background: #ffffff;
    border-top: 2px solid #808080;
    border-left: 2px solid #808080;
    border-right: 2px solid #ffffff;
    border-bottom: 2px solid #ffffff;
    outline: none;
    padding: 4px;
    font-size: 0.85rem;
    margin-top: 4px;
}

body.theme-win98 kbd {
    background: #e0e0e0;
    border: 1px solid #808080;
    border-radius: 2px;
    padding: 1px 4px;
    font-family: monospace;
    font-size: 0.8rem;
}


/* ==========================================================================
   THEME 2: MODERN NEON GLASSMORPHISM (DARK MODE)
   ========================================================================== */
body.theme-modern {
    background: radial-gradient(circle at top right, #1e1b4b, #0f172a, #0b0f19);
    color: #f8fafc;
    font-family: 'Outfit', sans-serif;
    min-height: 100vh;
    padding-bottom: 60px; /* Space for taskbar */
    padding-top: 20px;
    overflow-x: hidden;
}

/* Modern Taskbar (Mac-style Blur Dock) */
body.theme-modern .win98-taskbar {
    position: fixed;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 40px);
    max-width: 1000px;
    height: 48px;
    background: rgba(17, 24, 39, 0.6);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    z-index: 9999;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.4);
}

/* Start Button */
body.theme-modern .start-btn {
    height: 32px;
    background: linear-gradient(135deg, #06b6d4, #a855f7);
    color: #ffffff;
    border: none;
    border-radius: 10px;
    padding: 0 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    box-shadow: 0 0 10px rgba(168, 85, 247, 0.2);
}

body.theme-modern .start-btn:hover {
    transform: scale(1.03);
}

/* Start Menu Dropdown */
body.theme-modern .start-menu {
    position: absolute;
    bottom: 56px;
    left: 16px;
    width: 200px;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    z-index: 10000;
    padding: 6px;
    display: flex;
    flex-direction: column;
}

body.theme-modern .start-menu::before {
    display: none;
}

body.theme-modern .start-menu-item {
    padding: 8px 12px;
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #e2e8f0;
    border-radius: 8px;
}

body.theme-modern .start-menu-item:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #06b6d4;
}

body.theme-modern .start-menu-separator {
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
    margin: 6px 0;
}

/* Taskbar Task Buttons */
body.theme-modern .taskbar-tasks {
    flex-grow: 1;
    display: flex;
    margin: 0 15px;
    gap: 8px;
}

body.theme-modern .task-btn {
    height: 32px;
    max-width: 160px;
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 0 10px;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 6px;
    color: #94a3b8;
}

body.theme-modern .task-btn.active {
    background: rgba(255, 255, 255, 0.1);
    color: #06b6d4;
    border-color: #06b6d4;
}

/* System Tray */
body.theme-modern .taskbar-tray {
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    padding: 0 10px;
    display: flex;
    align-items: center;
    gap: 12px;
    height: 32px;
    border-radius: 10px;
}

body.theme-modern .tray-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 0.8rem;
    color: #94a3b8;
    font-family: inherit;
    font-weight: bold;
}

body.theme-modern .tray-btn:hover {
    color: #06b6d4;
}

body.theme-modern .tray-time {
    font-size: 0.8rem;
    color: #f8fafc;
}

/* Layout Grid */
body.theme-modern .app-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

body.theme-modern .main-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    justify-content: center;
    align-items: start;
}

@media (min-width: 992px) {
    body.theme-modern .main-layout {
        grid-template-columns: auto auto;
    }
}

/* Modern Window structure */
body.theme-modern .winmine-window {
    background: rgba(17, 24, 39, 0.7);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 1rem;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.4);
    display: inline-block;
    min-width: 250px;
    margin: 0 auto;
}

/* Title Bar */
body.theme-modern .winmine-title-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 0.6rem;
}

body.theme-modern .winmine-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #f8fafc;
    display: flex;
    align-items: center;
    gap: 6px;
}

body.theme-modern .winmine-controls {
    display: flex;
    gap: 4px;
}

body.theme-modern .winmine-btn-control {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    width: 20px;
    height: 20px;
    font-size: 0.7rem;
    border-radius: 5px;
    color: #94a3b8;
    cursor: pointer;
}

body.theme-modern .winmine-btn-control:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

body.theme-modern .winmine-btn-control.close:hover {
    background: #ef4444;
    color: #fff;
    border-color: #ef4444;
}

/* Menu Bar */
body.theme-modern .winmine-menu-bar {
    display: flex;
    font-size: 0.85rem;
    gap: 8px;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 0.8rem;
}

body.theme-modern .menu-item {
    position: relative;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    color: #94a3b8;
}

body.theme-modern .menu-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #f8fafc;
}

/* Dropdowns */
body.theme-modern .menu-dropdown {
    position: absolute;
    top: 28px;
    left: 0;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    z-index: 10000;
    min-width: 180px;
    padding: 6px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
}

body.theme-modern .dropdown-item {
    padding: 6px 12px 6px 24px;
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #e2e8f0;
    border-radius: 6px;
}

body.theme-modern .dropdown-item:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #06b6d4;
}

body.theme-modern .check-mark {
    position: absolute;
    left: 6px;
    font-weight: bold;
    color: #06b6d4;
}

body.theme-modern .dropdown-separator {
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
    margin: 6px 0;
}

/* Window Body Inner Box */
body.theme-modern .winmine-body {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Status Bar */
body.theme-modern .winmine-status-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 0.6rem 1rem;
}

/* LED Digital clock displays */
body.theme-modern .led-display {
    color: #a855f7;
    font-family: 'Share Tech Mono', Courier, monospace;
    font-size: 1.8rem;
    font-weight: bold;
    text-shadow: 0 0 8px rgba(168, 85, 247, 0.5);
}

/* Reset smiley button */
body.theme-modern .winmine-smiley {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

body.theme-modern .winmine-smiley:hover {
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 10px rgba(6, 182, 212, 0.2);
}

/* Board Outer border container */
body.theme-modern .winmine-board-container {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 12px;
    overflow: auto;
    max-width: 100%;
}

body.theme-modern .board-grid {
    display: grid;
    gap: 3px;
    width: max-content;
    height: max-content;
    margin: 0 auto;
}

/* Cell button styling */
body.theme-modern .cell {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.03);
    border-radius: 6px;
    font-family: 'Share Tech Mono', monospace;
    font-weight: bold;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    width: 40px;
    height: 40px;
}

body.theme-modern .cell:hover:not(.revealed):not(.flagged) {
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 0 8px #06b6d4;
    border-color: #06b6d4;
}

body.theme-modern .cell.keyboard-selected {
    box-shadow: 0 0 12px #a855f7 !important;
    border-color: #a855f7 !important;
    background: rgba(168, 85, 247, 0.15);
}

body.theme-modern .cell.revealed {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.02);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.4);
    cursor: default;
}

body.theme-modern .cell.flagged {
    color: #06b6d4;
    font-size: 1.1rem;
}

body.theme-modern .cell.exploded {
    background: linear-gradient(135deg, #7f1d1d, #ef4444);
    color: white;
    font-size: 1.1rem;
    animation: shake 0.2s ease-in-out infinite alternate;
}

body.theme-modern .cell.mine {
    background: rgba(255, 255, 255, 0.05);
    color: #64748b;
}

body.theme-modern .cell.revealed-mine {
    background: rgba(255, 255, 255, 0.08);
    color: #f59e0b;
    font-size: 1rem;
}

/* Modern Number colors */
body.theme-modern .cell-1 { color: #38bdf8; }
body.theme-modern .cell-2 { color: #4ade80; }
body.theme-modern .cell-3 { color: #f87171; }
body.theme-modern .cell-4 { color: #818cf8; }
body.theme-modern .cell-5 { color: #ec4899; }
body.theme-modern .cell-6 { color: #f97316; }
body.theme-modern .cell-7 { color: #c084fc; }
body.theme-modern .cell-8 { color: #94a3b8; }

/* Modern Tabs filter */
body.theme-modern .tabs-bar {
    display: flex;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 2px;
    border-radius: 10px;
    margin-bottom: 0.8rem;
}

body.theme-modern .btn-tab {
    font-family: 'Outfit', sans-serif;
    border: none;
    background: transparent;
    color: #94a3b8;
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

body.theme-modern .btn-tab:hover {
    color: #f8fafc;
}

body.theme-modern .btn-tab.active {
    background: rgba(255, 255, 255, 0.08);
    color: #06b6d4;
}

/* Modern Leaderboard */
body.theme-modern .leaderboard-container {
    background: transparent;
    min-height: 250px;
}

body.theme-modern .leaderboard-table th {
    text-align: left;
    color: #64748b;
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.75rem 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

body.theme-modern .leaderboard-table td {
    padding: 0.75rem 0.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.02);
}

body.theme-modern .rank-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    font-weight: 700;
    font-size: 0.8rem;
    background: rgba(255,255,255,0.05);
    color: #94a3b8;
}

body.theme-modern .rank-1 .rank-badge {
    background: linear-gradient(135deg, #fbbf24, #d97706);
    color: #000;
    box-shadow: 0 0 10px rgba(251, 191, 36, 0.3);
}

body.theme-modern .rank-2 .rank-badge {
    background: linear-gradient(135deg, #cbd5e1, #64748b);
    color: #000;
}

body.theme-modern .rank-3 .rank-badge {
    background: linear-gradient(135deg, #b45309, #78350f);
    color: #fff;
}

body.theme-modern .badge-diff {
    font-size: 0.75rem;
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    font-weight: 600;
    text-transform: uppercase;
}

body.theme-modern .badge-diff-easy { background: rgba(16, 185, 129, 0.1); color: #10b981; border: 1px solid rgba(16, 185, 129, 0.2); }
body.theme-modern .badge-diff-medium { background: rgba(245, 158, 11, 0.1); color: #f59e0b; border: 1px solid rgba(245, 158, 11, 0.2); }
body.theme-modern .badge-diff-hard { background: rgba(239, 68, 68, 0.1); color: #ef4444; border: 1px solid rgba(239, 68, 68, 0.2); }

/* Modern Modals */
body.theme-modern .modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(7, 10, 18, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 1rem;
}

body.theme-modern .glass-modal {
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: 2.5rem;
    max-width: 450px;
    width: 100%;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

body.theme-modern .glass-modal::before {
    display: none;
}

body.theme-modern .win-icon {
    font-size: 4rem;
    background: linear-gradient(135deg, #06b6d4, #a855f7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: block;
    margin-bottom: 0.5rem;
}

body.theme-modern .lose-icon {
    font-size: 4rem;
    color: #ef4444;
    display: block;
    margin-bottom: 0.5rem;
}

body.theme-modern .modal-header-win h2 {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: 0.5px;
}

body.theme-modern .modal-header-win p {
    color: #94a3b8;
    font-size: 1rem;
    margin-top: 0.25rem;
}

body.theme-modern .win-stat-row {
    display: flex;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 1rem;
}

body.theme-modern .win-stat .label {
    font-size: 0.7rem;
    font-weight: 800;
    color: #64748b;
    letter-spacing: 0.5px;
}

body.theme-modern .win-stat .value {
    font-size: 1.4rem;
    font-weight: 700;
    font-family: 'Share Tech Mono', monospace;
}

body.theme-modern .input-group {
    display: flex;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 4px;
    transition: focus-within 0.2s ease;
}

body.theme-modern .input-group:focus-within {
    border-color: #06b6d4;
    box-shadow: 0 0 10px rgba(6, 182, 212, 0.15);
}

body.theme-modern .input-group input {
    background: transparent;
    border: none;
    outline: none;
    color: #fff;
    padding: 0.6rem;
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    flex-grow: 1;
    min-width: 0;
}

body.theme-modern .btn-submit {
    background: linear-gradient(135deg, #06b6d4, #a855f7);
    border: none;
    color: #fff;
    font-weight: 600;
    padding: 0 1.2rem;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(168, 85, 247, 0.2);
    cursor: pointer;
}

body.theme-modern .form-hint {
    font-size: 0.75rem;
    color: #64748b;
    text-align: center;
    margin-top: 0.25rem;
}

body.theme-modern .btn-secondary-modal {
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: transparent;
    color: #94a3b8;
    padding: 0.6rem 1.5rem;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
}

body.theme-modern .btn-secondary-modal:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #f8fafc;
}

/* Modern Generic Buttons */
body.theme-modern .btn {
    font-family: 'Outfit', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.6rem 1.5rem;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none;
    display: inline-block;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: transparent;
    color: #94a3b8;
}

body.theme-modern .btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #f8fafc;
}

body.theme-modern .btn-primary {
    background: linear-gradient(135deg, #06b6d4, #a855f7);
    color: #ffffff;
    border: none;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(6, 182, 212, 0.3);
}

body.theme-modern .btn-primary:hover {
    box-shadow: 0 6px 20px rgba(6, 182, 212, 0.5);
    transform: translateY(-2px);
    color: #ffffff;
}

body.theme-modern .btn-primary:active {
    transform: translateY(0);
}

body.theme-modern kbd {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    padding: 2px 6px;
    font-family: monospace;
    font-size: 0.85rem;
    color: #ef4444;
}

/* ==========================================================================
   GLOBAL UTILITIES & ANIMATIONS
   ========================================================================== */
.d-none {
    display: none !important;
}

.text-end {
    text-align: right !important;
}

.text-center {
    text-align: center !important;
}

.text-red {
    color: #ef4444 !important;
}

.text-accent-cyan { color: #06b6d4 !important; }
.text-accent-purple { color: #a855f7 !important; }
.text-accent-yellow { color: #f59e0b !important; }
.text-accent-green { color: #10b981 !important; }

/* Shortcuts details layout */
.shortcuts-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 300px;
    overflow-y: auto;
    padding: 5px 0;
}

.shortcut-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

body.theme-win98 .shortcut-item {
    border-bottom: 1px dashed #a0a0a0;
    color: #000;
}

.settings-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.spinner {
    width: 32px;
    height: 32px;
    border: 3px solid rgba(255,255,255,0.05);
    border-top: 3px solid #06b6d4;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

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

@keyframes shake {
    0% { transform: translate(1px, 1px) rotate(0deg); }
    10% { transform: translate(-1px, -2px) rotate(-1deg); }
    20% { transform: translate(-3px, 0px) rotate(1deg); }
    30% { transform: translate(0px, 2px) rotate(0deg); }
    40% { transform: translate(1px, -1px) rotate(1deg); }
    50% { transform: translate(-1px, 2px) rotate(-1deg); }
    60% { transform: translate(-3px, 1px) rotate(0deg); }
    70% { transform: translate(2px, 1px) rotate(-1deg); }
    80% { transform: translate(-1px, -1px) rotate(1deg); }
    90% { transform: translate(2px, 2px) rotate(0deg); }
    100% { transform: translate(1px, -2px) rotate(-1deg); }
}

/* Guide Grid styling */
body.theme-win98 .guide-grid-container {
    background: #ffffff;
    border: 2px solid;
    border-color: #808080 #fff #fff #808080;
    padding: 10px;
    margin: 10px 0;
}

body.theme-win98 .guide-grid-cell-flat {
    width: 30px;
    height: 30px;
    background: #c0c0c0;
    border: 1px solid #808080;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

body.theme-win98 .guide-grid-cell-raised {
    width: 30px;
    height: 30px;
    background: #c0c0c0;
    border-top: 2px solid #fff;
    border-left: 2px solid #fff;
    border-right: 2px solid #808080;
    border-bottom: 2px solid #808080;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Modern Guide Grid */
body.theme-modern .guide-grid-container {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 10px;
    margin: 10px 0;
}

body.theme-modern .guide-grid-cell-flat {
    width: 30px;
    height: 30px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

body.theme-modern .guide-grid-cell-raised {
    width: 30px;
    height: 30px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.03);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}