/* ==========================================================================
   Sudoku Mind Master - Core Mobile-First Responsive PWA Styles
   ========================================================================== */

:root, [data-bs-theme="dark"], [data-theme-color="golden"] {
    --primary-color: #F5B027;
    --primary-hover: #d99617;
    --secondary-color: #F5B027;
    --accent-warning: #F5B027;
    --accent-success: #10b981;
    --accent-danger: #ef4444;
    
    --board-bg: #1e1e2e;
    --cell-bg: #2b2b40;
    --cell-text: #ffffff;
    --cell-initial-text: #F5B027;
    --cell-selected: #F5B027;
    --cell-selected-text: #000000;
    --cell-related: #3d2d09;
    --cell-match: #735108;
    --cell-match-text: #ffffff;
    --cell-error: #7f1d1d;
    --cell-error-text: #ffffff;
    
    --text-primary: #ffffff;
    --text-muted: #94a3b8;
    --grid-line: #475569;
    --grid-line-thick: #F5B027;
    --font-family: 'Inter', system-ui, -apple-system, sans-serif;

    /* Theme-specific UI variables */
    --header-bg: rgba(30, 30, 46, 0.88);
    --header-border: rgba(255, 255, 255, 0.1);
    --nav-bg: rgba(30, 30, 46, 0.95);
    --nav-border: rgba(255, 255, 255, 0.1);
    --glass-bg: rgba(30, 30, 46, 0.75);
    --glass-border: rgba(255, 255, 255, 0.12);
    --glass-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    --card-bg: #1e1e2e;
    --btn-action-bg: rgba(255, 255, 255, 0.08);
    --btn-action-border: rgba(255, 255, 255, 0.2);
    --btn-action-text: #ffffff;
    --btn-action-hover: rgba(255, 255, 255, 0.15);
}

/* Theme Color 2: Soft Mint Emerald */
[data-theme-color="emerald"] {
    --primary-color: #34D399;
    --primary-hover: #10B981;
    --secondary-color: #34D399;
    --accent-warning: #34D399;
    --cell-initial-text: #34D399;
    --cell-selected: #34D399;
    --cell-related: #064e3b;
    --cell-match: #047857;
    --grid-line-thick: #34D399;
}

/* Theme Color 3: Soft Sky Sapphire */
[data-theme-color="sapphire"] {
    --primary-color: #60A5FA;
    --primary-hover: #3B82F6;
    --secondary-color: #60A5FA;
    --accent-warning: #60A5FA;
    --cell-initial-text: #60A5FA;
    --cell-selected: #60A5FA;
    --cell-related: #1e3a8a;
    --cell-match: #1d4ed8;
    --grid-line-thick: #60A5FA;
}

/* Theme Color 4: Soft Lavender Purple */
[data-theme-color="purple"] {
    --primary-color: #A78BFA;
    --primary-hover: #8B5CF6;
    --secondary-color: #A78BFA;
    --accent-warning: #A78BFA;
    --cell-initial-text: #A78BFA;
    --cell-selected: #A78BFA;
    --cell-related: #4c1d95;
    --cell-match: #6d28d9;
    --grid-line-thick: #A78BFA;
}

[data-bs-theme="light"] {
    --board-bg: #ffffff;
    --cell-bg: #fffdf5;
    --cell-text: #0f172a;
    --cell-selected-text: #ffffff;
    --cell-related: #fef4d6;
    --cell-match: #fce7a6;
    --cell-match-text: #593e03;
    --cell-error: #fecaca;
    --cell-error-text: #991b1b;

    --text-primary: #0f172a;
    --text-muted: #475569;
    --grid-line: #cbd5e1;

    /* Theme-specific UI variables */
    --header-bg: rgba(255, 255, 255, 0.88);
    --header-border: rgba(0, 0, 0, 0.08);
    --nav-bg: rgba(255, 255, 255, 0.94);
    --nav-border: rgba(0, 0, 0, 0.08);
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(0, 0, 0, 0.08);
    --glass-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    --card-bg: #ffffff;
    --btn-action-bg: #ffffff;
    --btn-action-border: #cbd5e1;
    --btn-action-text: #1e293b;
    --btn-action-hover: #f1f5f9;
}

body {
    font-family: var(--font-family);
    background-color: var(--bs-body-bg);
    color: var(--text-primary);
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
    touch-action: manipulation;
    overflow-x: hidden;
}

/* Dynamic CSS Theme Variable Overrides */
.text-warning, .text-primary, .navbar-brand-title, .brand-logo-text {
    color: var(--primary-color) !important;
    background: none !important;
    -webkit-text-fill-color: initial !important;
}

.text-gradient {
    color: var(--primary-color) !important;
    background: none !important;
    -webkit-text-fill-color: initial !important;
    display: inline-block;
}

.bg-warning, .bg-primary {
    background-color: var(--primary-color) !important;
    color: #000000 !important;
}

.btn-warning, .btn-primary {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    color: #000000 !important;
    font-weight: 700 !important;
}

.btn-warning:hover, .btn-warning:focus, .btn-warning:active,
.btn-primary:hover, .btn-primary:focus, .btn-primary:active {
    background-color: var(--primary-hover) !important;
    border-color: var(--primary-hover) !important;
    color: #ffffff !important;
}

.btn-outline-warning, .btn-outline-primary {
    color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
}

.btn-outline-warning:hover, .btn-outline-warning:active,
.btn-outline-primary:hover, .btn-outline-primary:active {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    color: #000000 !important;
}

/* Brand Header Logo & Typography (Adaptive for Dark & Light Themes) */
.app-logo-brand {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    text-decoration: none !important;
    transition: transform 0.15s ease !important;
}

.app-logo-brand:hover {
    transform: scale(1.02);
}

.brand-logo-icon {
    width: 38px !important;
    height: 38px !important;
    border-radius: 8px !important;
    object-fit: contain !important;
    filter: drop-shadow(0 2px 6px rgba(245, 176, 39, 0.35));
    transition: filter 0.2s ease, transform 0.2s ease;
}

.brand-text-group {
    display: inline-flex !important;
    flex-direction: column !important;
    line-height: 1 !important;
    justify-content: center !important;
    width: fit-content !important;
}

.brand-title-main {
    font-family: 'Inter', system-ui, -apple-system, sans-serif !important;
    font-size: 1.52rem !important;
    font-weight: 900 !important;
    color: var(--primary-color, #F5B027) !important;
    letter-spacing: 1.5px !important;
    line-height: 0.95 !important;
    text-transform: uppercase !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.25) !important;
    transition: color 0.2s ease, text-shadow 0.2s ease !important;
    display: block !important;
    width: 100% !important;
}

.brand-subtitle-row {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    width: 100% !important;
    padding: 0 1.5px !important;
    box-sizing: border-box !important;
    font-family: 'Inter', system-ui, -apple-system, sans-serif !important;
    font-size: 0.44rem !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
    margin-top: 3px !important;
    line-height: 1 !important;
    color: #ffffff !important;
    opacity: 0.95;
    transition: color 0.2s ease !important;
}

.brand-subtitle-row span {
    display: inline-block !important;
    line-height: 1 !important;
}

.brand-subtitle-row .brand-word-gap {
    width: 6px !important;
    display: inline-block !important;
}

/* Light Mode Overrides for Header Logo */
[data-bs-theme="light"] .brand-title-main {
    color: var(--primary-color, #d97706) !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1) !important;
}

[data-bs-theme="light"] .brand-subtitle-row {
    color: #0f172a !important; /* Elegant bold dark slate text in Light Mode */
}

[data-bs-theme="light"] .brand-logo-icon {
    filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.15)) !important;
}

/* Bold and Strong Headings Everywhere */
h1, h2, h3, h4, h5, h6, .modal-title {
    font-weight: 800 !important;
    letter-spacing: -0.3px;
}

/* Golden Yellow Google Button Wrapper Styling */
.google-btn-wrapper {
    position: relative;
    width: 100%;
    max-w-xs: 280px;
    height: 44px;
    margin: 0 auto;
    border-radius: 50px !important;
    overflow: hidden;
}

.google-btn-custom-display {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--primary-color) !important;
    color: #000000 !important;
    font-weight: 800 !important;
    border-radius: 50px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    box-shadow: 0 4px 15px rgba(245, 176, 39, 0.4);
    pointer-events: none;
    z-index: 1;
}

.google-btn-iframe-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    opacity: 0.001 !important;
    z-index: 10 !important;
    cursor: pointer !important;
}

.google-btn-iframe-overlay iframe {
    width: 100% !important;
    height: 100% !important;
    cursor: pointer !important;
}

/* Theme Color Links & Emails */
footer a, footer a:visited, .theme-link, a.text-info {
    color: var(--primary-color) !important;
    font-weight: 700 !important;
    text-decoration: underline !important;
}

footer a:hover, a.text-info:hover {
    color: var(--primary-hover) !important;
}

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

/* Theme Color Picker Button Styles */
.btn-theme-picker {
    width: 38px;
    height: 38px;
    padding: 0;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
}

.btn-theme-picker:hover {
    transform: scale(1.15);
}

.btn-theme-picker.active {
    outline: 3px solid #ffffff;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.6);
}

/* Glassmorphism Cards */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 1rem;
    box-shadow: var(--glass-shadow);
    color: var(--text-primary);
}

/* Card General Override */
.card {
    background-color: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
}

/* Header Navbar Styling */
.app-header {
    background: var(--header-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--header-border) !important;
    box-shadow: var(--glass-shadow);
    z-index: 1020;
}

.btn-header-action {
    background: var(--btn-action-bg);
    border: 1px solid var(--btn-action-border);
    color: var(--btn-action-text);
    transition: all 0.2s ease;
}

.btn-header-action:hover {
    background: var(--btn-action-hover);
    color: var(--primary-color);
    border-color: var(--primary-color);
}

/* ==========================================================================
   Sudoku Board Responsive Layout
   ========================================================================== */

.game-container, .sudoku-container {
    max-width: 460px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
    padding: 0;
}

.sudoku-board-wrapper {
    position: relative;
    width: 100%;
    max-width: 460px;
    margin: 0 auto;
    aspect-ratio: 1 / 1;
    padding: 4px;
    background: var(--board-bg);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    border: 3px solid var(--grid-line-thick);
    box-sizing: border-box;
}

.sudoku-board, .sudoku-grid {
    display: grid !important;
    grid-template-columns: repeat(9, minmax(0, 1fr)) !important;
    grid-template-rows: repeat(9, minmax(0, 1fr)) !important;
    width: 100% !important;
    height: 100% !important;
    gap: 1px !important;
    background-color: var(--grid-line) !important;
    border-radius: 6px !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
}

.sudoku-cell {
    position: relative;
    background-color: var(--cell-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(1.1rem, 4vw, 1.8rem);
    font-weight: 700;
    color: var(--cell-text);
    cursor: pointer;
    transition: background-color 0.15s ease, transform 0.1s ease;
    user-select: none;
    -webkit-user-select: none;
}

.sudoku-cell:active {
    transform: scale(0.95);
}

/* Thick Box Borders */
.border-bottom-thick {
    border-bottom: 3px solid var(--grid-line-thick) !important;
}

.border-right-thick {
    border-right: 3px solid var(--grid-line-thick) !important;
}

/* Cell States & Highlights */
.sudoku-cell.initial-num {
    color: var(--cell-initial-text);
    font-weight: 800;
}

.sudoku-cell.selected {
    background-color: var(--cell-selected) !important;
    color: var(--cell-selected-text) !important;
}

.sudoku-cell.highlight-related {
    background-color: var(--cell-related);
}

.sudoku-cell.highlight-match {
    background-color: var(--cell-match);
    color: var(--cell-match-text);
}

.sudoku-cell.cell-error {
    background-color: var(--cell-error) !important;
    color: var(--cell-error-text) !important;
    animation: shake 0.3s ease-in-out;
}

/* Pencil / Notes Grid Inside Cell */
.sudoku-cell.has-notes .notes-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    width: 100%;
    height: 100%;
    padding: 2px;
}

.notes-grid span {
    font-size: clamp(0.5rem, 1.6vw, 0.72rem);
    font-weight: 600;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* Paused Blur Overlay */
.paused-blur {
    filter: blur(10px);
    pointer-events: none;
}

/* ==========================================================================
   Touch Controls & Keypad (1-9 Grid Alignment)
   ========================================================================== */

.number-pad {
    display: grid !important;
    grid-template-columns: repeat(9, 1fr) !important;
    gap: clamp(2px, 1vw, 4px) !important;
    margin-top: 10px !important;
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
}

.num-key {
    all: unset !important;
    box-sizing: border-box !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    aspect-ratio: 1 / 1.18 !important;
    padding: 3px 0 !important;
    margin: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: clamp(0.95rem, 4.4vw, 1.35rem) !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    border-radius: 6px !important;
    border: 1px solid var(--glass-border) !important;
    background: var(--btn-action-bg) !important;
    color: var(--text-primary) !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.12) !important;
    transition: transform 0.1s ease, background 0.15s ease !important;
    user-select: none !important;
    -webkit-user-select: none !important;
    touch-action: manipulation !important;
    text-align: center !important;
    cursor: pointer !important;
    overflow: hidden !important;
}

.num-key:hover {
    background: var(--btn-action-hover) !important;
    color: var(--primary-color) !important;
}

.num-key:active {
    transform: scale(0.92) !important;
}

.num-key span:first-child {
    display: block !important;
    line-height: 1 !important;
}

.num-key .badge-count {
    display: block !important;
    font-size: clamp(0.48rem, 1.8vw, 0.65rem) !important;
    font-weight: 600 !important;
    opacity: 0.75 !important;
    margin-top: 2px !important;
    line-height: 1 !important;
    color: var(--text-muted) !important;
}

.num-key.completed-num {
    opacity: 0.25 !important;
    pointer-events: none !important;
}

/* Keypad Action Tools (Grid of 5 equal width buttons) */
.action-tools-row {
    display: grid !important;
    grid-template-columns: repeat(5, 1fr) !important;
    gap: clamp(3px, 1.2vw, 6px) !important;
    margin-top: 10px !important;
    margin-bottom: 8px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

.action-tools-row .btn-tool {
    all: unset !important;
    box-sizing: border-box !important;
    width: 100% !important;
    min-width: 0 !important;
    padding: 6px 1px !important;
    font-size: clamp(0.65rem, 2.2vw, 0.78rem) !important;
    font-weight: 600 !important;
    line-height: 1.1 !important;
    border-radius: 8px !important;
    background: var(--btn-action-bg) !important;
    border: 1px solid var(--btn-action-border) !important;
    color: var(--btn-action-text) !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05) !important;
    transition: all 0.15s ease !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    cursor: pointer !important;
    user-select: none !important;
    -webkit-user-select: none !important;
    touch-action: manipulation !important;
}

.action-tools-row .btn-tool i {
    font-size: clamp(0.9rem, 3vw, 1.1rem) !important;
    margin-bottom: 2px !important;
    margin-right: 0 !important;
    line-height: 1 !important;
}

.action-tools-row .btn-tool:hover {
    background: var(--btn-action-hover) !important;
    color: var(--primary-color) !important;
}

.action-tools-row .btn-tool:active {
    transform: scale(0.94) !important;
}

.action-tools-row .btn-tool.active {
    background: var(--primary-color) !important;
    color: #ffffff !important;
    border-color: var(--primary-color) !important;
}

.action-tools-row .btn-hint-custom {
    background: #f59e0b !important;
    color: #000000 !important;
    font-weight: 700 !important;
    border: none !important;
}

.action-tools-row .btn-hint-custom:hover {
    background: #d97706 !important;
    color: #ffffff !important;
}

html, body {
    max-width: 100vw !important;
    overflow-x: hidden !important;
}

main.container {
    padding-left: 8px !important;
    padding-right: 8px !important;
    max-width: 480px !important;
}



/* ==========================================================================
   Navigation Bar & Responsive Header
   ========================================================================== */

.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 65px;
    background: var(--nav-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid var(--nav-border);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 1000;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.05);
}

/* Fixed Sticky Bottom Ad Banner - Positioned directly above bottom nav bar */
#ad-banner-sticky-bottom {
    position: fixed !important;
    bottom: 65px !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    z-index: 999 !important;
    background: #181825 !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.3) !important;
}

body {
    display: flex !important;
    flex-direction: column !important;
    min-height: 100vh !important;
    padding-bottom: 65px !important;
}

body.has-bottom-ad {
    padding-bottom: 120px !important;
}

main.container {
    flex: 1 0 auto !important;
    margin-bottom: 0 !important;
    padding-bottom: 10px !important;
}

footer.app-footer {
    margin-top: auto !important;
    margin-bottom: 0 !important;
    padding-top: 10px !important;
    padding-bottom: 8px !important;
    border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
}

/* Desktop View Responsive Mobile-Framed Layout & Sidebar Ads */
.desktop-layout-wrapper {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 20px;
    max-width: 1350px;
    margin: 0 auto;
    width: 100%;
}

.desktop-sidebar-ad {
    width: 260px;
    min-width: 260px;
    position: sticky;
    top: 80px;
    z-index: 10;
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    margin-top: 15px;
}

.ad-mock-sidebar {
    min-height: 450px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 1px dashed rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 20px 10px;
}

.app-main-frame {
    max-width: 500px !important;
    width: 100% !important;
    margin: 0 auto !important;
}

/* Ensure Sudoku Game Board doesn't stretch rectangular on wide screens */
#game-board-container, .game-board-wrapper, .sudoku-grid {
    max-width: 460px !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

.nav-link-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.nav-link-item i {
    font-size: 1.3rem;
    margin-bottom: 2px;
}

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

.nav-link-item.active {
    color: var(--primary-color);
    font-weight: 700;
}

/* Modals & Forms */
.modal-content {
    background: var(--glass-bg) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border) !important;
    color: var(--text-primary);
}

[data-bs-theme="light"] .form-control {
    background-color: #ffffff;
    color: #0f172a;
    border-color: #cbd5e1;
}

[data-bs-theme="light"] .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(79, 70, 229, 0.25);
}

/* Profile Stat Items */
.profile-stat-item {
    background: transparent;
    color: var(--text-primary);
    border-color: var(--glass-border);
}

/* Level Locked Card */
.level-locked {
    opacity: 0.6;
    background: var(--cell-bg) !important;
}

/* Banner Ads Styling */
.ad-card.banner-ad {
    position: relative;
    background: linear-gradient(135deg, #312e81, #1e1b4b);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 10px 14px;
    margin-top: 15px;
    color: #ffffff;
}

.ad-badge {
    position: absolute;
    top: 4px;
    right: 8px;
    font-size: 0.6rem;
    background: rgba(0, 0, 0, 0.4);
    padding: 1px 6px;
    border-radius: 4px;
    color: #f59e0b;
}

/* Modal Overlay for Interstitial & Rewarded Ads */
.ad-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.ad-modal-dialog {
    background: var(--board-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    max-width: 400px;
    width: 100%;
    padding: 20px;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    color: var(--text-primary);
}

.btn-close-ad {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.85rem;
    cursor: pointer;
}

/* Animations */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-6px); }
    40%, 80% { transform: translateX(6px); }
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.animate-bounce {
    animation: bounce 2s infinite;
}

/* Custom Bootstrap Modal Styling (Centered & Theme Matched) */
.modal-content.glass-card {
    background: var(--board-bg) !important;
    border: 1px solid var(--glass-border) !important;
    border-radius: 1.25rem !important;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4) !important;
    color: var(--text-primary) !important;
}

.modal-header .btn-close {
    filter: var(--bs-theme-close-btn-filter, invert(1) grayscale(100%) brightness(200%));
}

[data-bs-theme="light"] .modal-header .btn-close {
    filter: none;
}

.modal-backdrop.show {
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    opacity: 0.6;
}

/* ==========================================================================
   Store, Tasks & Glass Cards Modern Design System
   ========================================================================== */
.glass-card {
    background: var(--card-bg) !important;
    border: 1px solid var(--glass-border) !important;
    border-radius: 16px !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08) !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.glass-card:hover {
    border-color: var(--primary-color) !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12) !important;
}

.task-card {
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    min-height: 190px !important;
    height: 100% !important;
    padding: 16px !important;
    box-sizing: border-box !important;
    border-radius: 16px !important;
    position: relative;
    overflow: hidden;
}

.task-card .task-card-header {
    width: 100%;
}

.task-card .task-icon-box {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: var(--btn-action-bg);
    border: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.task-card .task-title {
    color: var(--text-primary) !important;
    font-size: 0.92rem;
    font-weight: 700;
    line-height: 1.3;
}

.task-card .task-description {
    color: var(--text-muted) !important;
    font-size: 0.82rem;
    line-height: 1.45;
    margin-top: 6px;
}

.badge-difficulty {
    font-size: 0.65rem !important;
    padding: 2px 7px !important;
    border-radius: 6px !important;
    font-weight: 800 !important;
    letter-spacing: 0.5px;
    display: inline-block;
}

.badge-difficulty.badge-easy {
    background: rgba(16, 185, 129, 0.15) !important;
    color: #10b981 !important;
    border: 1px solid rgba(16, 185, 129, 0.3) !important;
}

.badge-difficulty.badge-medium {
    background: rgba(245, 176, 39, 0.15) !important;
    color: #f59e0b !important;
    border: 1px solid rgba(245, 176, 39, 0.3) !important;
}

.badge-difficulty.badge-hard {
    background: rgba(239, 68, 68, 0.15) !important;
    color: #ef4444 !important;
    border: 1px solid rgba(239, 68, 68, 0.3) !important;
}

.task-card .task-points-badge .badge {
    font-size: 0.78rem !important;
    white-space: nowrap;
}

.task-card .task-action-wrapper {
    margin-top: auto !important;
    width: 100%;
}

.task-card .btn-action-task {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.88rem;
    padding-top: 8px !important;
    padding-bottom: 8px !important;
    transition: transform 0.15s ease;
}

.task-card .btn-action-task:hover:not(:disabled) {
    transform: translateY(-1px);
}

.shop-item-card {
    background: var(--card-bg) !important;
    border: 1px solid var(--glass-border) !important;
    border-radius: 16px !important;
    color: var(--text-primary) !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.shop-item-card:hover {
    border-color: var(--primary-color) !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12) !important;
    transform: translateY(-2px);
}

