/* =========================================
   GAMES CSS (Extracted)
   ========================================= */

/* --- Game Layout & UI Header --- */
.ui-game-header {
    background-color: #f1f5f9;
    border-bottom: 1px solid #e2e8f0;
    padding: 0.5rem 1rem;
    color: #334155;
    font-size: 1.15rem;
    font-weight: 600;
    margin: 0;
    text-align: center;
}

html.dark .ui-game-header {
    background-color: transparent;
    border-bottom: 1px solid #334155;
    color: #cbd5e1;
}

.ui-game-interface {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    width: 100%;
}

.ui-board-column {
    position: relative;
    flex: 1;
    width: 100%;
}

.ui-controls-column {
    flex: 0 0 auto;
    width: 100%;
}

.mascot-peeking {
    position: absolute;
    top: 50px;
    right: -55px;
    /* Stick out from the right edge */
    left: auto;
    width: 150px;
    z-index: -1;
    pointer-events: none;
    transform: scaleX(-1);
    /* Mirror so it faces left, peeking out from the right edge */
    transition: transform 0.3s ease;
}

@media (max-width: 1024px) {
    .mascot-peeking {
        display: none !important;
    }

    .ui-game-header {
        font-size: clamp(0.8rem, 4.5vw, 1.1rem);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .ui-controls-column {
        max-width: 100%;
        margin: 0 auto;
        padding: 0 1rem;
    }
}

@media (max-width: 767px) {
    .ui-controls-column {
        max-width: 320px;
    }

    .ui-action-buttons {
        margin-left: 0 !important;
    }
}


@media (min-width: 1280px) {
    .ui-game-interface {
        flex-direction: row;
        align-items: flex-start;
        justify-content: flex-start;
        gap: 2rem;
    }

    .ui-board-column {
        display: flex;
        flex-direction: column;
        align-items: center;
        max-width: 100%;
        padding: 0 2.5%;
        /* Reduces board size by 5% overall */
    }

    .ui-controls-column {
        flex: 0 0 210px;
        /* Reduced to 210px for ultra-compact, cohesive numpad */
        width: 210px;
    }
}

.key {
    min-width: 44px;
    min-height: 44px;
}

.key-wide {
    width: 55px !important;
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 1rem;
    margin-bottom: 1rem;
}


@media (min-width: 1024px) {
    .dmg-wide-btn {
        width: 112px !important;
        min-width: 112px !important;
    }
}



.sudoku-cell {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    aspect-ratio: 1 / 1;
}



@media (max-width: 768px) {
    .sudoku-cell {
        font-size: 1.2rem;
    }
}



@media (max-width: 400px) {

    #keyboard-container .key {
        width: 32px !important;
        min-width: 32px !important;
        height: 44px !important;
        font-size: 0.875rem !important;
        padding: 0 2px !important;
    }


    #keyboard-container .key[data-key="Delete"] {
        width: 52px !important;
        min-width: 52px !important;
        font-size: 0.7rem !important;
    }



}



.sudoku-cell {
    border: none !important;
    border-right: 1px solid #475569 !important;
    border-bottom: 1px solid #475569 !important;
    box-sizing: border-box;
}



.sudoku-cell[data-col="8"] {
    border-right: none !important;
}



.sudoku-cell[data-row="8"] {
    border-bottom: none !important;
}



.ui-sudoku-notes-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    width: 100%;
    height: 100%;
    pointer-events: none;
}



.ui-sudoku-note {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.55rem;
    font-weight: 600;
    line-height: 1;
    color: #c2410c;
}



html.dark .ui-sudoku-note {
    color: #fbbf24;
}



@media (min-width: 640px) {
    .ui-sudoku-note {
        font-size: 0.65rem;
    }
}



@media (min-width: 768px) {
    .ui-sudoku-note {
        font-size: 0.75rem;
    }
}



.dmg-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(17, 24, 39, 0.85);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}



.dmg-modal-card {
    background-color: #ffffff;
    background-image:
        radial-gradient(circle at 20% 30%, rgba(59, 130, 246, 0.08) 3px, transparent 4px),
        radial-gradient(circle at 80% 20%, rgba(239, 68, 68, 0.08) 3px, transparent 4px),
        radial-gradient(circle at 40% 70%, rgba(16, 185, 129, 0.08) 3px, transparent 4px),
        radial-gradient(circle at 70% 80%, rgba(245, 158, 11, 0.08) 3px, transparent 4px),
        radial-gradient(circle at 10% 80%, rgba(139, 92, 246, 0.08) 3px, transparent 4px),
        radial-gradient(circle at 90% 60%, rgba(236, 72, 153, 0.08) 3px, transparent 4px),
        radial-gradient(circle at 50% 15%, rgba(6, 182, 212, 0.08) 3px, transparent 4px),
        radial-gradient(circle at 30% 90%, rgba(244, 63, 94, 0.08) 3px, transparent 4px);
    background-size: 100px 100px;
    padding: 24px;
    border-radius: 16px;
    width: 90%;
    max-width: 400px;
    position: relative;
    z-index: 100000;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #111827;
}



.dark .dmg-modal-card {
    background-color: #1f2937;
    color: #f8fafc;
}



.dmg-modal-close {
    position: absolute;
    top: 8px;
    right: 16px;
    background: none;
    border: none;
    font-size: 32px;
    color: #6b7280;
    cursor: pointer;
    line-height: 1;
    z-index: 100001;
}



.dmg-modal-close:hover {
    color: #3b82f6;
}



.dmg-modal-mascot {
    width: 120px;
    height: 120px;
    object-fit: contain;
    margin: 0 auto 16px auto;
    display: block;
}



.dmg-modal-header {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #3A86FF;
    margin-bottom: 0.75em;
    line-height: 1.2;
}



.dmg-modal-title {
    font-size: clamp(1.75rem, 6vw, 2.25rem);
    font-weight: 800;
    margin-bottom: 0.2rem;
}



.dmg-modal-subtitle {
    font-size: clamp(1.15rem, 4.5vw, 1.35rem);
    font-weight: 700;
    white-space: nowrap;
}



.dmg-modal-body {
    text-align: center;
    margin-bottom: 1.5em;
    width: 100%;
}



.dmg-modal-stat-streak {
    font-weight: 700;
    margin-bottom: 0.25rem;
    color: #3A86FF;
    font-size: clamp(1.25rem, 5vw, 1.5rem);
}

html.dark .dmg-modal-header,
html.dark .dmg-modal-title,
html.dark .dmg-modal-stat-streak {
    color: var(--color-text-main) !important;
}

.dmg-modal-title-centered {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

@media (max-width: 768px) {
    .dmg-modal-title-centered {
        display: block;
        text-align: center;
    }

    .dmg-modal-title-centered .dmg-modal-text {
        position: relative;
        display: inline-block;
    }

    .dmg-modal-title-centered .dmg-modal-icon {
        position: absolute;
        right: 100%;
        margin-right: 0.5rem;
    }

    .dmg-modal-title-centered .dmg-modal-spacer {
        display: none;
    }
}



.dmg-modal-stat-xp {
    font-size: 0.9rem;
    color: #4B5563;
}



.dark .dmg-modal-stat-xp {
    color: #9ca3af;
}



.dmg-modal-stat-time {
    font-weight: 600;
    margin-bottom: 1.25rem;
    color: #64748b;
    font-size: clamp(1.1rem, 4vw, 1.25rem);
}



.dark .dmg-modal-stat-time {
    color: #94a3b8;
}



.dmg-modal-stat-time-val {
    color: #1e293b;
}



.dark .dmg-modal-stat-time-val {
    color: #f8fafc;
}



.dmg-cta-primary {
    display: block;
    width: 100%;
    background: linear-gradient(135deg, #6FCF97 0%, #FFD700 100%);
    color: #111827;
    font-weight: bold;
    font-size: 1.15rem;
    padding: 14px 32px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(111, 207, 151, 0.4);
    text-decoration: none;
    margin-bottom: 12px;
    transition: transform 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}



.dmg-cta-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(111, 207, 151, 0.6);
}



.dmg-share-wrapper {
    position: relative;
    display: inline-block;
    width: 100%;
    margin-bottom: 12px;
}



.dmg-cta-secondary {
    display: block;
    width: 100%;
    background: transparent;
    color: #3A86FF;
    border: 2px solid #3A86FF;
    font-weight: bold;
    font-size: 1rem;
    padding: 10px 32px;
    border-radius: 10px;
    cursor: pointer;
    margin-bottom: 12px;
    transition: transform 0.2s, background 0.2s;
    box-sizing: border-box;
}



.dmg-cta-secondary:hover {
    background: rgba(58, 134, 255, 0.1);
    transform: translateY(-2px);
}



.dmg-share-dropdown {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 100%;
    margin-bottom: 8px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
    z-index: 100;
    overflow: hidden;
    animation: dmgSlideUp 0.2s ease-out;
}



.dark .dmg-share-dropdown {
    background: #374151;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}



.dmg-share-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    text-decoration: none;
    color: #333;
    font-weight: 600;
    border-bottom: 1px solid #eee;
    transition: background 0.15s;
    background: none;
    border-top: none;
    border-left: none;
    border-right: none;
    width: 100%;
    text-align: left;
    font-size: 1rem;
    cursor: pointer;
    box-sizing: border-box;
}



.dark .dmg-share-option {
    color: #f3f4f6;
    border-bottom: 1px solid #4b5563;
}



.dmg-share-option:last-child {
    border-bottom: none;
}



.dmg-share-option:hover {
    background: #f3f4f6 !important;
}



.dark .dmg-share-option:hover {
    background: #4b5563 !important;
}



.dmg-share-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}



.dmg-share-icon-fb {
    background: #1877F2;
}



.dmg-share-icon-x {
    background: #000;
}



.dmg-share-icon-reddit {
    background: #FF4500;
}



.dmg-share-icon-email {
    background: #EA4335;
}



.dmg-share-icon-copy {
    background: #6B7280;
}



.dmg-cta-tertiary {
    display: block;
    width: 100%;
    color: #3A86FF;
    font-weight: bold;
    font-size: 1rem;
    padding: 10px 32px;
    border: 2px solid #3A86FF;
    border-radius: 10px;
    text-decoration: none;
    transition: background 0.2s;
    box-sizing: border-box;
    text-align: center;
}



.dmg-cta-tertiary:hover {
    background: rgba(58, 134, 255, 0.1);
}



.dmg-modal-cta-btn {
    background: #3A86FF;
    color: #fff;
    font-weight: bold;
    font-size: 1.15rem;
    padding: 12px 32px;
    border-radius: 10px;
    box-shadow: 0 2px 8px #3A86FF33;
    text-decoration: none;
    transition: background 0.18s;
    display: inline-block;
    margin-bottom: 8px;
}



.dmg-modal-cta-btn:hover {
    background: #2556b8;
}



.dmg-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: dmg-fadeIn 0.25s;
}



.dmg-modal-card {
    background-color: #fff;
    color: #222;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(60, 80, 120, 0.18);
    max-width: 720px;
    width: 96vw;
    padding: 32px 24px 24px 24px;
    position: relative;
    font-family: system-ui, sans-serif;
    animation: dmg-scaleIn 0.22s cubic-bezier(.4, 1.4, .6, 1.0);
}



.dmg-modal-title {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 12px;
    color: #3A86FF;
    letter-spacing: -1px;
}



.dmg-modal-close {
    position: absolute;
    top: 18px;
    right: 18px;
    font-size: 2rem;
    color: #757E87;
    background: none;
    border: none;
    cursor: pointer;
    font-weight: bold;
    border-radius: 6px;
    width: 40px;
    height: 40px;
    line-height: 1;
    text-align: center;
    transition: background 0.15s;
}



.dmg-modal-close:focus {
    background: #E6B04E22;
    outline: none;
}



.dmg-modal-body {
    font-size: 1.08rem;
    line-height: 1.7;
    margin-bottom: 18px;
}



@media (max-width: 600px) {

    .dmg-modal-card {
        width: calc(100vw - 32px) !important;
        max-width: calc(100vw - 32px) !important;
        padding: 18px 16px !important;
        margin: 16px !important;
        overflow-x: hidden;
        word-wrap: break-word;
    }


    .dmg-modal-title {
        font-size: 1.3rem;
    }


    .dmg-modal-body {
        font-size: 1rem;
    }


    .dmg-modal-card img[alt="Victory Gecko"] {
        width: 50px !important;
        height: 50px !important;
        top: 8px !important;
        left: 8px !important;
    }


    .dmg-modal-card .dmg-modal-title {
        padding-left: 55px;
    }



}



.ui-numpad-btn {
    flex: 1 1 auto !important;
    max-width: 4rem;
    min-width: 0 !important;
}




.ui-util-btn {
    position: relative;
    flex: 0 0 3.5rem;
    width: 3.5rem;
    aspect-ratio: 1 / 1;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    border: 1px solid var(--color-border);
    background-color: var(--color-surface);
    color: var(--color-text-main);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: all 0.15s ease;
}



.ui-util-btn:hover {
    box-shadow: var(--shadow-md);
    background-color: var(--color-surface-muted);
}



.ui-util-btn[style*="pointer-events: none"] {
    opacity: 0.5;
    cursor: not-allowed;
}



html.dark .ui-util-btn {
    background-color: #1f2937;
    border-color: #374151;
    color: #e5e7eb;
}



html.dark .ui-util-btn:hover {
    background-color: #374151;
}


.ui-numpad-utils {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    gap: 0.5rem;
    margin-top: 1rem;
    margin-bottom: 0.75rem;
}


.ui-number-pad {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    gap: 0.25rem;
    width: 100%;
    margin-bottom: 0.75rem;
}

@media (min-width: 768px) and (max-width: 1024px) {

    .ui-numpad-utils {
        flex-wrap: nowrap;
        justify-content: center;
        overflow-x: visible;
        padding-bottom: 0;
        gap: 1.5rem;
    }

    .ui-number-pad {
        flex-wrap: nowrap;
        justify-content: center;
        overflow-x: visible;
        padding-bottom: 0;
        gap: 0.75rem;
    }

    .ui-numpad-btn {
        max-width: 6rem;
        aspect-ratio: 1 / 1;
    }
}

@media (min-width: 1025px) {
    .ui-numpad-utils {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        overflow-x: visible;
        padding-bottom: 0;
    }

    .ui-number-pad {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        overflow-x: visible;
        padding-bottom: 0;
        margin-left: 1.25rem;
    }
}



.ui-numpad-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    /* Ensure it fills grid perfectly */
    height: auto;
    aspect-ratio: 3 / 4;
    background-color: var(--color-surface);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-border);
    cursor: pointer;
    transition: all 0.15s ease;
    min-width: 0;
}



.ui-numpad-btn:hover {
    box-shadow: var(--shadow-md);
    background-color: var(--color-surface-accent);
}



html.dark .ui-numpad-btn {
    background-color: #1f2937;
    border-color: #374151;
}



html.dark .ui-numpad-btn:hover {
    background-color: #374151;
}



.ui-numpad-number {
    font-size: 1.875rem;
    font-weight: 900;
    color: var(--color-text-main);
}



html.dark .ui-numpad-number {
    color: #f3f4f6;
}



.ui-numpad-count {
    font-size: 11px;
    font-weight: 700;
    color: var(--color-text-muted);
    margin-top: 0.25rem;
}



.ui-action-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    width: 100%;
    margin-left: 1.25rem;
}



.ui-action-btn {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    width: 100%;
    font-weight: 700;
    padding: 0.75rem 0.5rem;
    border-radius: var(--radius-xl);
    font-size: 0.95rem;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: background-color 0.15s ease;
    border: none;
    line-height: 1.2;
    min-height: 3.5rem;
}



.ui-action-btn-secondary {
    background-color: var(--color-border);
    color: var(--color-text-main);
}



.ui-action-btn-secondary:hover {
    background-color: #d1d5db;
}



html.dark .ui-action-btn-secondary {
    background-color: #1f2937;
    color: #e5e7eb;
}



html.dark .ui-action-btn-secondary:hover {
    background-color: #374151;
}



.ui-action-btn-primary {
    background-color: #2563eb;
    color: #ffffff;
}



.ui-action-btn-primary:hover {
    background-color: #1d4ed8;
}



@media (max-width: 639px) {
    .track-a-layout.game-layout-wide {
        padding-left: 0.25rem;
        padding-right: 0.25rem;
    }

    .ui-board-column {
        padding-left: 0.25rem;
        padding-right: 0.25rem;
    }
}



.ui-modal-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 50;
}



.ui-modal-overlay.hidden {
    display: none;
}



.ui-modal-card {
    background-color: #ffffff;
    color: #1e293b;
    border-radius: 0.5rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    padding: 1.5rem;
    width: 91.666667%;
    /* 11/12 */
    max-width: 28rem;
    /* max-w-md */
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}



html.dark .ui-modal-card {
    background-color: #1e293b;
    color: #f8fafc;
}



.ui-btn-modal-green {
    display: block;
    margin: 0 auto;
    position: static !important;
    width: 100%;
    background-color: #22c55e;
    color: #ffffff;
    font-weight: 700;
    padding: 0.75rem 1rem;
    border-radius: 0.25rem;
    font-size: 1.125rem;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s;
}



.ui-btn-modal-green:hover {
    background-color: #16a34a;
}



.ui-btn-modal-yellow {
    display: block;
    margin: 0 auto;
    position: static !important;
    width: 100%;
    background-color: #eab308;
    color: #ffffff;
    font-weight: 700;
    padding: 0.75rem 1rem;
    border-radius: 0.25rem;
    font-size: 1.125rem;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s;
}



.ui-btn-modal-yellow:hover {
    background-color: #ca8a04;
}



.ui-btn-modal-red {
    width: 100%;
    background-color: #ef4444;
    color: #ffffff;
    font-weight: 700;
    padding: 0.75rem 1rem;
    border-radius: 0.25rem;
    font-size: 1.125rem;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s;
}



.ui-btn-modal-red:hover {
    background-color: #dc2626;
}



.ui-btn-modal-gray {
    display: block;
    margin: 0 auto;
    position: static !important;
    width: 100%;
    background-color: #64748b;
    color: #ffffff;
    font-weight: 700;
    padding: 0.75rem 1rem;
    border-radius: 0.25rem;
    font-size: 1.125rem;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s;
}



.ui-btn-modal-gray:hover {
    background-color: #475569;
}



.dmg-cta-primary {
    display: block;
    width: 100%;
    max-width: 280px;
    background-color: #3A86FF;
    color: #ffffff;
    font-weight: bold;
    font-size: 1.1rem;
    padding: 14px 24px;
    border-radius: 10px;
    text-decoration: none;
    text-align: center;
    box-shadow: 0 4px 12px rgba(58, 134, 255, 0.3);
    margin: 0 auto 12px auto;
    transition: transform 0.2s, box-shadow 0.2s;
    border: none;
    cursor: pointer;
}



.dmg-cta-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(58, 134, 255, 0.4);
    color: #ffffff;
}



.dmg-cta-tertiary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: fit-content;
    margin: 0 auto;
    color: #3A86FF;
    font-weight: 600;
    font-size: 1rem;
    padding: 10px 20px;
    border: 2px solid #3A86FF;
    border-radius: 8px;
    text-decoration: none;
    transition: background 0.2s;
    background: transparent;
}



.dmg-cta-tertiary:hover {
    background: rgba(58, 134, 255, 0.1);
}



.dmg-share-wrapper {
    position: relative;
    display: inline-block;
    width: 100%;
    margin-top: 1.5rem;
}



.dmg-share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    max-width: 280px;
    background-color: #3b82f6;
    color: white;
    font-weight: bold;
    padding: 0.75rem 2rem;
    border-radius: 0.5rem;
    transition: all 0.3s;
    transform: scale(1);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    margin: 0 auto;
    border: none;
    cursor: pointer;
}



.dmg-share-btn:hover {
    background-color: #2563eb;
    transform: scale(1.05);
}



.dmg-share-dropdown {
    position: absolute;
    bottom: 100%;
    margin-bottom: 8px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
    z-index: 100;
    overflow: hidden;
}



.dmg-share-dropdown.is-hidden {
    display: none;
}



.dmg-share-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    text-decoration: none;
    color: #333;
    font-weight: 600;
    border-bottom: 1px solid #eee;
    background: none;
    text-align: left;
    transition: background 0.2s;
}



.dmg-share-option:hover {
    background: #f3f4f6;
    color: #333;
}



.dmg-share-option-btn {
    width: 100%;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}



.dmg-share-icon-facebook {
    width: 32px;
    height: 32px;
    background: #1877F2;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}



.dmg-share-icon-x {
    width: 32px;
    height: 32px;
    background: #000;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}



.dmg-share-icon-reddit {
    width: 32px;
    height: 32px;
    background: #FF4500;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}



.dmg-share-icon-email {
    width: 32px;
    height: 32px;
    background: #EA4335;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}



.dmg-share-icon-copy {
    width: 32px;
    height: 32px;
    background: #6B7280;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}



.dmg-cta-primary {
    display: inline-block;
    background-color: var(--accent);
    color: #fff;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 700;
    text-decoration: none;
    text-align: center;
    width: 100%;
    margin-bottom: 1rem;
    transition: background-color 0.2s;
}



.dmg-cta-primary:hover {
    background-color: var(--color-primary-hover);
}



.dmg-cta-tertiary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: var(--color-text-muted);
    text-decoration: none;
    padding: 0.5rem;
    transition: color 0.2s;
}



.dmg-cta-tertiary:hover {
    color: var(--color-text-main);
}



.dark .dmg-share-icon-x {
    background-color: #333333;
}



.dmg-modal-body .dmg-share-wrapper {
    max-width: 280px;
    margin-left: auto;
    margin-right: auto;
    display: block;
}

.sidebar-card-footer {
    width: 100%;
    border-top: 1px solid rgba(51, 65, 85, 0.5);
    padding-top: 1rem;
    text-align: center;
}

.ui-controls-inner {
    width: 100%;
    max-width: 280px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.ui-instructions-wrapper {
    margin-top: 2.5rem;
    margin-bottom: 1.5rem;
    padding-left: 1rem;
    padding-right: 1rem;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.ui-instructions-card {
    background-color: #ffffff;
    padding: 2rem;
    border-radius: 1rem;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    width: 100%;
    max-width: 800px;
    text-align: left;
}

html.dark .ui-instructions-card {
    background-color: #1f2937;
    border-color: #374151;
}

.ui-related-header {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1d4ed8;
}

html.dark .ui-related-header {
    color: #60a5fa;
}

.ui-related-link {
    color: #1d4ed8;
    font-weight: 600;
    font-size: 0.875rem;
    text-decoration: none;
}

.ui-related-link:hover {
    text-decoration: underline;
}

html.dark .ui-related-link {
    color: #60a5fa;
}

.ui-related-wrapper {
    padding-top: 3rem;
    padding-bottom: 3rem;
    margin-top: 3rem;
    background-color: #ffffff;
    border-top: 1px solid #e2e8f0;
    border-radius: 1rem;
    margin-left: auto;
    margin-right: auto;
    max-width: 750px;
}

html.dark .ui-related-wrapper {
    background-color: #111827;
    border-top-color: #1f2937;
}

.ui-related-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 768px) {

    .ui-related-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.ui-related-card {
    background-color: #f9fafb;
    border-radius: 1rem;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    overflow: hidden;
    border: 1px solid #f3f4f6;
    text-align: left;
    transition: all 0.3s;
}

.ui-related-card:hover {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

html.dark .ui-related-card {
    background-color: #1f2937;
    border-color: #374151;
}

/* Inner Styles (Dark Mode Support) */
.ui-instructions-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    color: #374151;
}

html.dark .ui-instructions-content {
    color: #d1d5db;
}

.ui-instructions-content h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

html.dark .ui-instructions-content h3 {
    color: #f3f4f6;
}

.ui-instructions-content p,
.ui-instructions-content ul {
    line-height: 1.625;
    margin-bottom: 0.75rem;
}

.ui-instructions-content ul {
    list-style-type: disc;
    padding-left: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.ui-pro-tip {
    background-color: #eff6ff;
    padding: 1rem;
    border-radius: 0.75rem;
    border: 1px solid #dbeafe;
}

html.dark .ui-pro-tip {
    background-color: rgba(30, 58, 138, 0.3);
    border-color: #1e40af;
}

.ui-pro-tip h3 {
    font-size: 1.125rem;
    color: #1e40af;
}

html.dark .ui-pro-tip h3 {
    color: #93c5fd;
}

.ui-pro-tip p {
    color: #1e3a8a;
}

html.dark .ui-pro-tip p {
    color: #bfdbfe;
}

.premium-sidebar-card {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border: 1px solid rgba(148, 163, 184, 0.1);
    border-radius: var(--radius-2xl);
    padding: 1.5rem;
    text-align: center;
    color: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5), 0 0 15px rgba(59, 130, 246, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.premium-sidebar-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 30px 60px -15px rgba(0, 0, 0, 0.6), 0 0 25px rgba(59, 130, 246, 0.3);
}

.sidebar-card-title {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
    color: #ffffff;
    margin-top: 0;
}

.sidebar-card-desc {
    color: #cbd5e1;
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
    line-height: 1.625;
}

.premium-card-btn {
    background: linear-gradient(90deg, #3b82f6 0%, #2563eb 100%);
    color: #ffffff;
    font-weight: 700;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-xl);
    margin-bottom: 1.5rem;
    text-align: center;
    display: block;
    width: 100%;
    text-decoration: none;
    box-shadow: 0 4px 14px 0 rgba(59, 130, 246, 0.5);
    transition: all 0.3s ease;
}

.premium-card-btn:hover {
    background: linear-gradient(90deg, #2563eb 0%, #1d4ed8 100%);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.7);
    transform: scale(1.02);
}

.sidebar-checklist {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 0.75rem;
    color: #cbd5e1;
}

.sidebar-checklist li {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.check-icon {
    color: #4ade80;
}

/* Settings Modal Component */
.ui-modal-header {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e2e8f0;
}

html.dark .ui-modal-header {
    border-bottom-color: #334155;
}

.ui-modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
    text-align: center;
    width: 100%;
}

html.dark .ui-modal-title {
    color: #f8fafc;
}

/* Redefine modal-close-btn to work universally inside ui-modal-header */
.ui-modal-header .modal-close-btn {
    position: absolute;
    top: -0.1rem;
    right: 0.5rem;
    background: none;
    border: none;
    font-size: 2rem;
    line-height: 1;
    color: #64748b;
    cursor: pointer;
    transition: color 0.2s ease;
}

.ui-modal-header .modal-close-btn:hover {
    color: #3b82f6;
    /* Accent color */
}

html.dark .ui-modal-header .modal-close-btn {
    color: #94a3b8;
}

html.dark .ui-modal-header .modal-close-btn:hover {
    color: #60a5fa;
}

.ui-modal-body {
    padding: 0;
}

/* Settings Modal Specifics */
.ui-settings-section {
    padding: 1.25rem 0;
    border-bottom: 1px solid #e2e8f0;
}

html.dark .ui-settings-section {
    border-bottom-color: #334155;
}

.ui-settings-section:first-child {
    padding-top: 0;
}

.ui-settings-section:last-child {
    border-bottom: none;
}

.ui-settings-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: #3b82f6;
    margin-bottom: 1rem;
}

html.dark .ui-settings-title {
    color: #60a5fa;
}

.ui-settings-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ui-settings-label {
    font-size: 1rem;
    font-weight: 600;
    color: #1e293b;
}

html.dark .ui-settings-label {
    color: #f8fafc;
}

.ui-settings-hint {
    font-size: 0.875rem;
    color: #64748b;
    margin-top: 0.25rem;
}

html.dark .ui-settings-hint {
    color: #94a3b8;
}

.ui-settings-select {
    width: 100%;
    padding: 0.75rem 1rem;
    margin-top: 0.5rem;
    border-radius: 0.5rem;
    background-color: #f8fafc;
    border: 1px solid #cbd5e1;
    font-size: 1rem;
    color: #1e293b;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231e293b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1em;
}

html.dark .ui-settings-select {
    background-color: #0f172a;
    border-color: #334155;
    color: #f8fafc;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f8fafc' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
}

.ui-settings-footer {
    text-align: center;
    padding-top: 1.5rem;
    font-size: 0.875rem;
    color: #64748b;
}

html.dark .ui-settings-footer {
    color: #94a3b8;
}

/* Toggle Switch */
.ui-toggle-switch {
    position: relative;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
}

.ui-toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.ui-toggle-slider {
    width: 2.75rem;
    height: 1.5rem;
    background-color: #cbd5e1;
    border-radius: 9999px;
    position: relative;
    transition: background-color 0.2s;
}

.ui-toggle-slider::after {
    content: '';
    position: absolute;
    top: 0.125rem;
    left: 0.125rem;
    width: 1.25rem;
    height: 1.25rem;
    background-color: white;
    border-radius: 50%;
    transition: transform 0.2s;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.ui-toggle-switch input:checked+.ui-toggle-slider {
    background-color: #3b82f6;
}

.ui-toggle-switch input:checked+.ui-toggle-slider::after {
    transform: translateX(1.25rem);
}

html.dark .ui-toggle-slider {
    background-color: #475569;
}

.ui-settings-footer p {
    margin-bottom: 0.25rem;
}

.ui-btn-danger {
    width: 100%;
    background-color: #fee2e2;
    color: #b91c1c;
    font-weight: 600;
    padding: 0.75rem;
    border-radius: 0.5rem;
    border: 1px solid #fca5a5;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.2s ease;
}

.ui-btn-danger:hover {
    background-color: #fecaca;
}

html.dark .ui-btn-danger {
    background-color: rgba(185, 28, 28, 0.2);
    color: #f87171;
    border-color: #7f1d1d;
}

html.dark .ui-btn-danger:hover {
    background-color: rgba(185, 28, 28, 0.4);
}