/* =====================================================================
   DAILY MODE CSS
   Extracted from lexilayers.css for better maintainability
   ===================================================================== */

/* =====================================================================
   LANDING PAGE - DAILY CARD
   ===================================================================== */

#landing-daily-card {
    border: 2px solid #ef6c00;
    grid-column: 1 / -1;
    flex-direction: row;
    align-items: center;
    text-align: left;
    padding: 20px 32px;
    gap: 20px;
    min-height: auto;
}

#landing-daily-card .card-title {
    font-size: 1.5rem;
}

#landing-daily-card .card-desc {
    margin-bottom: 0;
}

#landing-daily-card .landing-mode-btn {
    width: auto;
    padding: 12px 32px;
    margin-top: 0;
    white-space: nowrap;
}

/* Daily card content wrapper for horizontal layout */
.daily-card-content {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

/* Daily stats preview on landing card */
.daily-stats-preview {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 8px;
    font-size: 0.85rem;
    color: #666;
}

.daily-stats-players {
    display: flex;
    align-items: center;
    gap: 4px;
}

.daily-stats-leader {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: rgba(251, 191, 36, 0.15);
    border-radius: 20px;
    font-weight: 500;
}

.daily-stats-leader:empty {
    display: none;
}

body.dark-mode .daily-stats-preview {
    color: #a0aec0;
}

body.dark-mode .daily-stats-leader {
    background: rgba(251, 191, 36, 0.2);
}

/* Landing daily card responsive */
@media (max-width: 768px) {
    #landing-daily-card {
        flex-direction: column;
        text-align: left;
        padding: 24px 20px;
        gap: 16px;
    }

    #landing-daily-card .card-title {
        font-size: 1.3rem;
    }

    #landing-daily-card .landing-mode-btn {
        width: 100%;
    }
}

/* =====================================================================
   DAILY PAGE BASE
   ===================================================================== */

#daily-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    min-height: calc(100vh - var(--header-h));
    background: linear-gradient(180deg, #ff98006e 0%, #ebe5d6 60%);
    box-shadow: 0 4px 12px #ff572230;
    text-align: center;
    padding: 20px;
    padding-top: calc(-14px + var(--header-h, 52px));
    padding-bottom: 40px;
    box-sizing: border-box;
    transition: opacity 0.8s ease-in-out;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}

body.dark-mode #daily-page {
    background: linear-gradient(180deg, #5c1a1a 0%, #1e293b 60%);
}

/* Daily - Yellow border for cards */
#daily-page .lp-card,
.daily-card-modern {
    border: 2px solid #f8c44f;
}

/* daily title wrap - no longer used with modern design */
.daily-title-wrap {
    margin-bottom: 20px;
}

/* Countdown Timer */
.daily-countdown {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    margin: 12px 0 16px;
}

.daily-countdown .countdown-label {
    font-size: 0.9rem;
    color: #666;
    font-weight: 500;
}

.daily-countdown .countdown-time {
    font-size: 1.2rem;
    font-weight: 700;
    color: #1487c6;
    font-family: 'Courier New', monospace;
}

/* Daily Settings Section */
.daily-settings-section {
    margin: 16px 0 20px;
}

.daily-settings-label {
    font-size: 1rem;
    color: #555;
    font-weight: 600;
    margin-bottom: 8px;
}

/* Daily Mode Info Display */
.daily-mode-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin: 16px 0 24px;
}

.daily-mode-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(20, 135, 198, 0.1);
    border: 2px solid #1487c6;
    border-radius: 20px;
    padding: 8px 20px;
    font-size: 1.1rem;
    font-weight: 600;
    color: #1487c6;
}

.daily-mode-pill .mode-icon {
    font-size: 1.2rem;
}

.daily-mode-details {
    font-size: 0.9rem;
    color: #666;
}

#daily-play-btn {
    margin-top: 16px;
}

.daily-status-message {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 16px 0;
    padding: 16px 24px;
    background: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: 12px;
}

.daily-status-message .status-icon {
    font-size: 1.5rem;
}

.daily-status-message .status-text {
    text-align: left;
}

.daily-status-message .status-text strong {
    display: block;
    color: #155724;
    font-size: 1rem;
    margin-bottom: 4px;
}

.daily-status-message .status-text p {
    margin: 0;
    color: #1e7e34;
    font-size: 0.9rem;
}

/* =====================================================================
   MODERN DAILY HUB - ELEGANT DESIGN
   ===================================================================== */

/* Daily Hub Container - matches Face-Off layout */
.daily-hub-container {
    width: 100%;
    max-width: 1200px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Daily Header Bar - warm orange themed */
.daily-header-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 20px;
    background: linear-gradient(135deg, #fff4e6, #ffe4c4);
    border-radius: 16px;
    border: 2px solid #FF9800;
    box-shadow: 0 4px 12px #ff572273;
}

body.dark-mode .daily-header-bar {
    background: linear-gradient(135deg, #3f2d22, #412708);
    border-color: #d98b73;
}

.daily-header-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.daily-title-icon {
    font-size: 1.8rem;
}

.daily-title-text {
    font-size: 1.6rem;
    font-weight: 700;
    color: #6b5900;
    text-transform: uppercase;
    letter-spacing: 1px;
}

body.dark-mode .daily-title-text {
    color: #ffd54f;
}

/* Daily Coin Balance Display */
.daily-coin-balance-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 8px 16px;
}

.daily-coin-amount {
    font-size: 2.2rem;
    font-weight: 700;
    background: linear-gradient(135deg, #f9a825, #e65100);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

body.dark-mode .daily-coin-amount {
    background: linear-gradient(135deg, #ffd54f, #ffab40);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.daily-coin-icon-large {
    width: 48px;
    height: 48px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

/* =====================================================================
   DAILY HUB - MULTI-CARD GRID LAYOUT
   ===================================================================== */

/* Main 3-column grid layout - constrained to match header */
.daily-hub-layout {
    display: grid;
    grid-template-columns: 1fr 1fr 240px;
    grid-template-rows: auto auto;
    gap: 16px;
    width: 100%;
    max-width: 100%;
}

/* Left column - Challenge info & History */
.daily-hub-main {
    display: contents;
}

/* Center column - Results, Streak, Stats */
.daily-hub-center {
    display: contents;
}

/* Row 1: Daily Challenge + Today's Results - same height */
.daily-challenge-card {
    grid-column: 1;
    grid-row: 1;
}

.daily-results-card {
    grid-column: 2;
    grid-row: 1;
}

/* Row 2: Previous Results + Your Stats - same height */
.daily-history-card {
    grid-column: 1;
    grid-row: 2;
    min-height: 220px;
}

.daily-stats-card {
    grid-column: 2;
    grid-row: 2;
    min-height: 220px;
}

/* Right sidebar - Leaderboard spans both rows */
.daily-hub-sidebar {
    grid-column: 3;
    grid-row: 1 / 3;
    display: flex;
    flex-direction: column;
}

/* Common section card styling - base */
.daily-section {
    border-radius: 12px;
    padding: 16px 20px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 6px 18px rgba(0,0,0,.08);
}

/* Daily Challenge Card - warm orange tint */
.daily-section.daily-challenge-card {
    /* background: linear-gradient(180deg, rgb(239 108 0 / 44%), rgb(255 167 38 / 63%)); */
    border: 1px solid rgb(239 109 2);
}

body.dark-mode .daily-section.daily-challenge-card {
    background: linear-gradient(180deg, rgb(24 14 6 / 45%), rgb(39 40 43 / 90%));
    border-color: rgba(239, 108, 0, 0.5);
}

/* Results Card - amber/gold tint */
.daily-section.daily-results-card {
    /* background: linear-gradient(180deg, rgb(239 108 0 / 44%), rgb(255 167 38 / 63%)); */
    border: 1px solid rgb(239 109 2);
}

body.dark-mode .daily-section.daily-results-card {
    background: linear-gradient(180deg, rgb(24 14 6 / 45%), rgb(39 40 43 / 90%));
    border-color: rgba(255, 193, 7, 0.5);
}

/* History Card - neutral warm */
.daily-section.daily-history-card {
    /* background: linear-gradient(180deg, rgb(239 108 0 / 58%), rgb(255 167 38 / 40%)); */
    border: 1px solid rgb(239 109 2);
}

body.dark-mode .daily-section.daily-history-card {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.1), rgba(30, 41, 59, 0.9));
    border-color: rgba(251, 191, 36, 0.4);
}

/* Stats Card - warm neutral */
.daily-section.daily-stats-card {
    /* background: linear-gradient(180deg, rgb(239 108 0 / 58%), rgb(255 167 38 / 40%)); */
    border: 1px solid rgb(239 109 2);
}

body.dark-mode .daily-section.daily-stats-card {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(30, 41, 59, 0.9));
    border-color: rgba(245, 158, 11, 0.4);
}

/* Leaderboard Card - subtle warm */
.daily-section.daily-leaderboard-card {
    /* background: linear-gradient(180deg, rgb(239 108 0 / 44%), rgb(255 167 38 / 63%)); */
    border: 1px solid rgb(239 109 2);
}

body.dark-mode .daily-section.daily-leaderboard-card {
    background: linear-gradient(135deg, rgba(217, 119, 6, 0.1), rgba(30, 41, 59, 0.95));
    border-color: rgba(217, 119, 6, 0.4);
}

/* Shimmer sweep effect - matches Face-Off */
.daily-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 50%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    mask-image: linear-gradient(180deg, rgba(0,0,0,1) 0%, rgba(0,0,0,0) 100%);
    -webkit-mask-image: linear-gradient(180deg, rgba(0,0,0,1) 0%, rgba(0,0,0,0) 100%);
    pointer-events: none;
}

.daily-section:hover::after {
    animation: shimmer 0.6s ease forwards;
}

body.dark-mode .daily-section {
    background: linear-gradient(180deg, #2d3748 0%, #1a202c 100%);
    border-color: rgba(248, 196, 79, 0.4);
    box-shadow:
        0 6px 18px rgba(0,0,0,.3),
        inset 0 1px 0 rgba(255,255,255,0.1);
}

body.dark-mode .daily-section::after {
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.15),
        transparent
    );
}

/* Section header with title and help icon */
.daily-section-header {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 12px;
    position: relative;
}

.daily-section-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--ink-90, #1a1a1a);
    text-align: center;
}

body.dark-mode .daily-section-header h3 {
    color: #fff;
}

/* Help icon button - positioned absolutely so title stays centered */
.daily-help-icon {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    min-width: 24px;
    min-height: 24px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.15);
    color: var(--ink-60, #666);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    padding: 0;
    line-height: 1;
}

.daily-help-icon:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #1487c6;
}

body.dark-mode .daily-help-icon {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: #fff;
}

body.dark-mode .daily-help-icon:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Daily Challenge Card */
.daily-challenge-card {
    text-align: center;
}

.daily-challenge-card .daily-card-date {
    display: block;
    color: var(--ink-50, #888);
    font-size: 0.9rem;
    margin-bottom: 12px;
}

body.dark-mode .daily-challenge-card .daily-card-date {
    color: rgba(255, 255, 255, 0.6);
}

/* Time Left Section */
.daily-time-left-section {
    text-align: center;
    margin: 16px 0;
}

.daily-time-label {
    font-size: 0.75rem;
    color: var(--ink-50, #888);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

body.dark-mode .daily-time-label {
    color: rgba(255, 255, 255, 0.6);
}

.daily-time-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: #1487c6;
}

body.dark-mode .daily-time-value {
    color: #22d3ee;
}

/* History Card - styled like Face-Off open challenges */
.daily-history-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* History items styled like Face-Off open challenge items */
.daily-history-item {
    display: grid;
    grid-template-columns: 110px 120px auto 30px;
    align-items: center;
    gap: 6px;
    background: linear-gradient(180deg, #fafafa 0%, #e9edf3 100%);
    border: 1px solid #d0d5dd;
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 0.75rem;
    text-align: left;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgb(89 83 83 / 58%);
}

.daily-history-item:hover {
    border-color: #f8c44f;
    box-shadow: 0 2px 6px rgba(248, 196, 79, 0.15);
}

body.dark-mode .daily-history-item {
    background: linear-gradient(180deg, #3a4556 0%, #2d3748 100%);
    border-color: #4a5568;
}

body.dark-mode .daily-history-item:hover {
    border-color: #f8c44f;
    box-shadow: 0 2px 6px rgba(248, 196, 79, 0.25);
}

.daily-history-date {
    color: var(--ink-80, #333);
    font-weight: 500;
}

body.dark-mode .daily-history-date {
    color: rgba(255, 255, 255, 0.85);
}

.daily-history-players {
    color: var(--ink-50, #888);
    font-size: 0.7rem;
}

body.dark-mode .daily-history-players {
    color: rgba(255, 255, 255, 0.5);
}

.daily-history-rank {
    font-weight: 600;
    color: #d97706;
}

body.dark-mode .daily-history-rank {
    color: #fbbf24;
}

.daily-history-coins {
    display: flex;
    align-items: center;
    gap: 3px;
    font-weight: 600;
    color: #d97706;
    font-size: 0.7rem;
}

body.dark-mode .daily-history-coins {
    color: #fbbf24;
}

.daily-history-coins .inline-coin {
    width: 12px;
    height: 12px;
}

.inline-coin {
    width: 14px;
    height: 14px;
    vertical-align: middle;
}

.daily-history-empty {
    text-align: center;
    color: var(--ink-50, #888);
    padding: 20px;
    font-style: italic;
}

body.dark-mode .daily-history-empty {
    color: rgba(255, 255, 255, 0.5);
}

/* Today's Results Card */
.daily-results-stats {
    display: flex;
    justify-content: space-around;
    gap: 16px;
    padding: 15px 0;
}

.daily-result-stat {
    text-align: center;
}

.daily-result-label {
    font-size: 0.65rem;
    color: var(--ink-50, #888);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

body.dark-mode .daily-result-label {
    color: rgba(255, 255, 255, 0.5);
}

.daily-result-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--ink-90, #1a1a1a);
}

body.dark-mode .daily-result-value {
    color: #fff;
}

/* Streak Section (inside Results card with divider) */
.daily-streak-section {
    text-align: center;
    padding-top: 12px;
    margin-top: 12px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

body.dark-mode .daily-streak-section {
    border-top-color: rgba(255, 255, 255, 0.15);
}

.daily-streak-label {
    font-size: 0.75rem;
    color: var(--ink-50, #888);
    margin-top: 18px;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

body.dark-mode .daily-streak-label {
    color: rgba(255, 255, 255, 0.6);
}

.daily-streak-display {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 8px;
}

.daily-streak-text {
    font-size: 2.3rem;
    font-weight: 800;
    color: var(--ink-70, #555);
}

body.dark-mode .daily-streak-text {
    color: rgba(255, 255, 255, 0.8);
}

.daily-streak-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: #d97706;
    text-shadow: 0 2px 6px rgba(217, 119, 6, 0.25);
}

body.dark-mode .daily-streak-number {
    color: #fbbf24;
    text-shadow: 0 2px 6px rgba(251, 191, 36, 0.3);
}

/* Stats Card */
.daily-stats-subtitle {
    margin: 0 0 12px;
    font-size: 0.75rem;
    color: var(--ink-50, #888);
    text-align: center;
}

body.dark-mode .daily-stats-subtitle {
    color: rgba(255, 255, 255, 0.5);
}

.daily-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.daily-stats-positions {
    margin-top: 10px;
}

.daily-stat-position {
    background: linear-gradient(180deg, #fff8e1 0%, #ffecb3 100%);
    border-color: #ffc107;
}

body.dark-mode .daily-stat-position {
    background: linear-gradient(180deg, #4a3f2a 0%, #3d3426 100%);
    border-color: #ffc107;
}

.daily-stat-box {
    background: linear-gradient(180deg, #fafafa 0%, #e9edf3 100%);
    border-radius: 8px;
    padding: 10px 6px;
    text-align: center;
    border: 1px solid #d0d5dd;
    box-shadow: 0 1px 2px rgb(89 83 83 / 44%);
}

body.dark-mode .daily-stat-box {
    background: linear-gradient(180deg, #3a4556 0%, #2d3748 100%);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.daily-stat-number {
    font-size: 1rem;
    font-weight: 700;
    color: var(--ink-90, #1a1a1a);
    line-height: 1;
    margin-bottom: 4px;
}

body.dark-mode .daily-stat-number {
    color: #fff;
}

.daily-stat-box .daily-stat-label {
    font-size: 0.6rem;
    color: var(--ink-50, #888);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

body.dark-mode .daily-stat-box .daily-stat-label {
    color: rgba(255, 255, 255, 0.5);
}

/* Leaderboard Card */
.daily-leaderboard-card {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.daily-lb-header-compact {
    margin-bottom: 8px;
    text-align: center;
}

.daily-lb-header-compact h3 {
    margin: 0 0 10px 0;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--ink-90, #1a1a1a);
}

body.dark-mode .daily-lb-header-compact h3 {
    color: #fff;
}

/* Leaderboard Tab Buttons - smaller and centered */
.daily-lb-tabs-modern {
    display: flex;
    justify-content: center;
    gap: 4px;
    margin-bottom: 10px;
}

.daily-lb-tab-btn {
    background: #f5f5f5;
    border: 1px solid #d0d5dd;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    color: #666;
}

.daily-lb-tab-btn:hover {
    background: #e0e0e0;
    border-color: #bbb;
}

.daily-lb-tab-btn.active {
    background: linear-gradient(135deg, #f8c44f, #e5a91a);
    color: #1a1a1a;
    border-color: #e5a91a;
}

.daily-lb-tab-btn.active:hover {
    background: linear-gradient(135deg, #ffd666, #f8c44f);
}

body.dark-mode .daily-lb-tab-btn {
    background: #3a4556;
    border-color: #4a5568;
    color: #a0aec0;
}

body.dark-mode .daily-lb-tab-btn:hover {
    background: #4a5568;
    border-color: #5a6a7a;
}

body.dark-mode .daily-lb-tab-btn.active {
    background: linear-gradient(135deg, #f8c44f, #e5a91a);
    border-color: #e5a91a;
    color: #1a1a1a;
}

body.dark-mode .daily-lb-tab-btn.active:hover {
    background: linear-gradient(135deg, #ffd666, #f8c44f);
}

.daily-lb-list-compact {
    display: flex;
    flex-direction: column;
    gap: 1px;
    flex: 1;
    overflow-y: auto;
    max-height: 400px;
    padding: 2px 0;
}

/* Leaderboard entries - matches multiplayer leaderboard style */
.daily-hub-sidebar .daily-lb-entry {
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 2px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    transition: background 0.2s ease;
}

.daily-hub-sidebar .daily-lb-entry:last-child {
    border-bottom: none;
}

.daily-hub-sidebar .daily-lb-entry:hover {
    background: rgba(0, 0, 0, 0.03);
}

body.dark-mode .daily-hub-sidebar .daily-lb-entry {
    border-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode .daily-hub-sidebar .daily-lb-entry:hover {
    background: rgba(255, 255, 255, 0.05);
}

.daily-hub-sidebar .daily-lb-entry.is-self {
    background: rgba(20, 135, 198, 0.1);
}

body.dark-mode .daily-hub-sidebar .daily-lb-entry.is-self {
    background: rgba(59, 130, 246, 0.2);
}

/* Rank */
.daily-hub-sidebar .daily-lb-rank {
    font-size: 0.9rem;
    font-weight: 700;
    color: #666;
    min-width: 20px;
    text-align: center;
}

body.dark-mode .daily-hub-sidebar .daily-lb-rank {
    color: #8ab4e8;
}

.daily-hub-sidebar .daily-lb-rank.gold { color: #d97706; }
.daily-hub-sidebar .daily-lb-rank.silver { color: #64748b; }
.daily-hub-sidebar .daily-lb-rank.bronze { color: #c2410c; }

body.dark-mode .daily-hub-sidebar .daily-lb-rank.gold { color: #ffd966; }
body.dark-mode .daily-hub-sidebar .daily-lb-rank.silver { color: #cbd5e1; }
body.dark-mode .daily-hub-sidebar .daily-lb-rank.bronze { color: #f59e0b; }

/* Avatar - matches multiplayer (26px, slightly rounded square) */
.daily-hub-sidebar .daily-lb-avatar {
    width: 26px;
    height: 26px;
    border-radius: 12%;
    overflow: hidden;
    background: #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

body.dark-mode .daily-hub-sidebar .daily-lb-avatar {
    background: rgba(255, 255, 255, 0.1);
}

.daily-hub-sidebar .daily-lb-avatar img,
.daily-hub-sidebar .daily-lb-avatar svg {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Info container - name and stats on two lines */
.daily-hub-sidebar .daily-lb-info {
    flex: 1;
    min-width: 0;
}

.daily-hub-sidebar .daily-lb-name {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--ink, #1a1a1a);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

body.dark-mode .daily-hub-sidebar .daily-lb-name {
    color: #fff;
}

/* Score/stats - second line */
.daily-hub-sidebar .daily-lb-score {
    font-size: 0.75rem;
    color: #888;
    margin-top: 2px;
}

body.dark-mode .daily-hub-sidebar .daily-lb-score {
    color: #8ab4e8;
}

/* Daily Hub Buttons */
.daily-hub-buttons {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 16px;
}

/* Responsive - Tablet */
@media (max-width: 1024px) {
    .daily-hub-layout {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto auto auto;
    }

    .daily-challenge-card { grid-column: 1; grid-row: 1; }
    .daily-results-card { grid-column: 2; grid-row: 1; }
    .daily-history-card { grid-column: 1; grid-row: 2; }
    .daily-stats-card { grid-column: 2; grid-row: 2; }
    .daily-hub-sidebar { grid-column: 1 / -1; grid-row: 3; }

    .daily-lb-list-compact {
        max-height: 200px;
    }
}

/* Responsive - Mobile */
@media (max-width: 700px) {
    .daily-hub-layout {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }

    .daily-challenge-card,
    .daily-results-card,
    .daily-history-card,
    .daily-stats-card,
    .daily-hub-sidebar {
        grid-column: 1;
        grid-row: auto;
    }

    .daily-streak-number {
        font-size: 2rem;
    }

    .daily-streak-text {
        font-size: 2rem;
    }

    .daily-stats-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .daily-hub-buttons {
        flex-direction: column;
        align-items: center;
    }

    .daily-hub-buttons .btnunified {
        width: 100%;
        max-width: 280px;
    }
}

/* Responsive */
@media (max-width: 600px) {
    .daily-hub-container {
        padding: 12px;
    }

    .daily-header-bar {
        padding: 10px 14px;
        gap: 10px;
    }

    .daily-title-icon {
        font-size: 1.4rem;
    }

    .daily-title-text {
        font-size: 1.2rem;
    }

    .daily-coin-amount {
        font-size: 1.4rem;
    }

    .daily-coin-icon-large {
        width: 32px;
        height: 32px;
    }
}

/* =====================================================================
   MODERN DAILY CARD
   ===================================================================== */

.daily-card-container {
    width: 100%;
    max-width: 1000px;
    margin: 20px auto;
    padding: 0 24px;
    box-sizing: border-box;
}

.daily-card-modern {
    background: var(--bg-color, #ffffff);
    border-radius: 20px;
    box-shadow: 0 4px 24px rgb(0 0 0 / 46%);
    overflow: hidden;
    border: 2px solid #f8c44f;
    width: 100%;
    box-sizing: border-box;
}

/* Daily page card styling - yellow fade for Daily theme */
#daily-page .daily-hub-content .daily-card-modern {
    border: 2px solid #f8c44f !important;
    border-radius: 12px !important;
    background: linear-gradient(180deg, #fdf19a 0%, #d9dfcd 100%) !important;
    box-shadow: 0 6px 18px rgba(0,0,0,.08) !important;
    position: relative;
    overflow: hidden;
}

body.dark-mode #daily-page .daily-hub-content .daily-card-modern {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(139, 92, 246, 0.1)) !important;
    border-color: rgba(198, 40, 40, 0.5) !important;
    box-shadow:
        0 6px 18px rgba(0,0,0,.3),
        inset 0 1px 0 rgba(255,255,255,0.1) !important;
}

/* Header Row */
.daily-card-header-row {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 24px 28px 16px;
    border-bottom: 1px solid var(--border-color, #f0f0f0);
    position: relative;
}

.daily-card-title-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    text-align: center;
}

.daily-card-main-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    color: var(--ink-90, #1a1a1a);
}

.daily-card-date {
    font-size: 0.95rem;
    color: var(--ink-60, #666);
    font-weight: 500;
}

.daily-help-btn-modern {
    position: absolute;
    right: 28px;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid var(--border-color, #e0e0e0);
    background: transparent;
    color: var(--ink-60, #666);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.daily-help-btn-modern:hover {
    border-color: #1487c6;
    color: #1487c6;
    background: rgba(20, 135, 198, 0.05);
}

/* Mode Info Row */
.daily-mode-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color, #f0f0f0);
    flex-wrap: wrap;
}

.daily-mode-icon {
    font-size: 1.3rem;
}

.daily-mode-name {
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--ink-90, #1a1a1a);
}

body.dark-mode .daily-mode-name {
    color: #ffffff;
}

.daily-mode-divider {
    width: 1px;
    height: 20px;
    background: var(--border-color, #ddd);
    margin: 0 8px;
}

.daily-mode-detail {
    color: var(--ink-70, #555);
    font-size: 0.95rem;
}

.daily-mode-dot {
    color: var(--ink-40, #aaa);
    margin: 0 4px;
}

/* Stats Row */
.daily-stats-modern {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: var(--border-color, #f0f0f0);
}

.daily-stat-item {
    background: var(--bg-color, #fff);
    padding: 20px 16px;
    text-align: center;
}

.daily-stat-label {
    font-size: 0.75rem;
    color: var(--ink-50, #888);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.daily-stat-value {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--ink-90, #1a1a1a);
}

.daily-stat-value.countdown {
    font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
    color: #1487c6;
}

/* Action Row */
.daily-action-modern {
    padding: 24px 28px;
    display: flex;
    justify-content: center;
    border-bottom: 1px solid var(--border-color, #f0f0f0);
}

.daily-play-btn-modern {
    display: block;
    margin: 0 auto;
    background: linear-gradient(135deg, #1487c6 0%, #0d6eaa 100%);
    color: white;
    border: none;
    padding: 16px 48px;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(20, 135, 198, 0.3);
}

.daily-play-btn-modern:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(20, 135, 198, 0.4);
}

/* Completed section with share button */
.daily-completed-section {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

.daily-completed-modern {
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
}

.daily-completed-modern .completed-icon {
    font-size: 1.1rem;
}

.daily-share-btn-modern {
    display: flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 3px 10px rgba(102, 126, 234, 0.3);
}

.daily-share-btn-modern:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

/* =====================================================================
   DAILY LEADERBOARD
   ===================================================================== */

.daily-leaderboard-section {
    padding: 0;
}

.daily-lb-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 28px;
    flex-wrap: wrap;
    gap: 12px;
}

.daily-lb-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0;
    color: var(--ink-80, #333);
}

.daily-lb-container {
    overflow-x: auto;
    max-height: 400px;
    overflow-y: auto;
}

.daily-lb-table {
    width: 100%;
    border-collapse: collapse;
}

.daily-lb-table thead {
    position: sticky;
    top: 0;
    background: var(--bg-color, #fff);
    z-index: 1;
}

.daily-lb-table th {
    padding: 12px 16px;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--ink-50, #888);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border-color, #eee);
}

.daily-lb-table th:first-child {
    width: 50px;
    text-align: center;
    padding-left: 28px;
}

.daily-lb-table th:nth-child(3),
.daily-lb-table th:nth-child(4) {
    text-align: right;
    width: 80px;
}

.daily-lb-table th:last-child {
    padding-right: 28px;
}

.daily-lb-table td {
    padding: 14px 4px;
    border-bottom: 1px solid var(--border-color, #f5f5f5);
    font-size: 0.95rem;
    color: var(--ink-80, #333);
}

.daily-lb-table td:first-child {
    text-align: center;
    font-weight: 600;
    color: var(--ink-50, #888);
    padding-left: 28px;
}

.daily-lb-table td:nth-child(3) {
    text-align: right;
    color: var(--ink-60, #666);
}

.daily-lb-table td:nth-child(4) {
    text-align: right;
    font-weight: 700;
    color: var(--ink-90, #222);
}

.daily-lb-table td:last-child {
    padding-right: 28px;
}

.daily-lb-table tbody tr:hover {
    background: var(--surface-2, #fafafa);
}

.daily-lb-table tbody tr.current-user-row {
    background: rgba(20, 135, 198, 0.08);
}

.daily-lb-table tbody tr.current-user-row:hover {
    background: rgba(20, 135, 198, 0.12);
}

.daily-lb-message {
    text-align: center;
    padding: 40px 28px;
    color: var(--ink-50, #888);
    font-size: 0.95rem;
}

/* =====================================================================
   DAILY CARD DARK MODE
   ===================================================================== */

body.dark-mode .daily-card-container .daily-card-modern {
    background: var(--bg-color);
    border-color: #f8c44f;
}

body.dark-mode .daily-card-main-title {
    color: var(--ink-90);
}

body.dark-mode .daily-card-header-row,
body.dark-mode .daily-action-modern {
    border-color: var(--border-color);
}

body.dark-mode .daily-mode-row {
    background: var(--surface-1);
}

body.dark-mode .daily-mode-detail {
    color: var(--ink-70);
}

body.dark-mode .daily-stats-modern {
    background: var(--border-color);
}

body.dark-mode .daily-stat-item {
    background: var(--bg-color);
}

body.dark-mode .daily-stat-label {
    color: var(--ink-50);
}

body.dark-mode .daily-stat-value {
    color: var(--ink-90);
}

body.dark-mode .daily-help-btn-modern {
    border-color: var(--border-color);
    color: var(--ink-60);
}

body.dark-mode .daily-help-btn-modern:hover {
    border-color: #1487c6;
    color: #1487c6;
}

body.dark-mode .daily-lb-table thead {
    background: var(--bg-color);
}

body.dark-mode .daily-lb-table th,
body.dark-mode .daily-lb-table td {
    border-color: var(--border-color);
}

body.dark-mode .daily-lb-table td {
    color: var(--ink-80);
}

body.dark-mode .daily-lb-table tbody tr:hover {
    background: var(--surface-2);
}

body.dark-mode .daily-lb-table tbody tr.current-user-row {
    background: rgba(20, 135, 198, 0.15);
}

body.dark-mode .daily-lb-table tbody tr.current-user-row:hover {
    background: rgba(20, 135, 198, 0.2);
}

/* Mobile responsiveness for modern daily */
@media (max-width: 600px) {
    .daily-card-container {
        padding: 0 12px;
    }

    .daily-card-header-row {
        padding: 16px 16px 12px;
    }

    .daily-card-main-title {
        font-size: 1.2rem;
    }

    .daily-help-btn-modern {
        right: 16px;
    }

    .daily-mode-row {
        padding: 12px 16px;
    }

    .daily-stats-modern {
        grid-template-columns: 1fr;
    }

    .daily-stat-item {
        padding: 14px 16px;
    }

    .daily-stat-value {
        font-size: 1.2rem;
    }

    .daily-action-modern {
        padding: 16px;
    }

    .daily-play-btn-modern {
        width: 100%;
        padding: 14px 24px;
    }

    .daily-lb-header {
        padding: 16px;
    }

    .daily-lb-table th:first-child,
    .daily-lb-table td:first-child {
        padding-left: 16px;
    }

    .daily-lb-table th:last-child,
    .daily-lb-table td:last-child {
        padding-right: 16px;
    }
}

/* =====================================================================
   DAILY START OVERLAY
   ===================================================================== */

#daily-start-overlay.overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 950;
}

#daily-start-overlay .modal-card {
    background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 20px;
    padding: 32px 40px;
    min-width: 340px;
    max-width: 420px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    text-align: center;
}

#daily-start-overlay .sp-header {
    flex-direction: column;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

#daily-start-overlay .sp-avatar {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    border: 4px solid #f59e0b;
    box-shadow: 0 8px 24px rgba(245, 158, 11, 0.3);
}

#daily-start-overlay .sp-user {
    text-align: center;
}

#daily-start-overlay .sp-username {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--ink, #174a87);
    margin-bottom: 4px;
}

#daily-start-overlay .sp-subtitle {
    font-size: 0.95rem;
    color: #666;
    font-weight: 500;
}

#daily-start-overlay .daily-mode-info {
    background: #f1f5f9;
    border-radius: 10px;
    padding: 12px 16px;
    margin: 0 0 16px;
    font-size: 0.9rem;
    color: var(--ink, #174a87);
    font-weight: 500;
    text-align: center;
}

body.dark-mode #daily-start-overlay .daily-mode-info {
    background: #1e293b;
    color: #e2e8f0;
}

#daily-start-overlay .sp-stats {
    background: #f1f5f9;
    border-radius: 12px;
    padding: 12px;
    margin: 0 0 16px;
}

#daily-start-overlay .sp-stats .row {
    background: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 10px 14px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

#daily-start-overlay .sp-stats .label {
    font-size: 0.85rem;
    color: #64748b;
}

#daily-start-overlay .sp-stats .value {
    font-size: 1rem;
    color: var(--ink, #174a87);
}

#daily-start-overlay h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--ink, #174a87);
    margin: 16px 0 8px;
}

#daily-start-overlay .actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

#daily-start-overlay #daily-start-btn {
    flex: 1;
    padding: 14px 24px;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: 12px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #fff;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(245, 158, 11, 0.4);
    transition: all 0.2s ease;
}

#daily-start-overlay #daily-start-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.5);
}

#daily-start-overlay #daily-cancel-btn {
    flex: 1;
    padding: 14px 24px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 12px;
    background: #e2e8f0;
    color: #475569;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

#daily-start-overlay #daily-cancel-btn:hover {
    background: #cbd5e1;
    transform: translateY(-2px);
}

/* Dark mode for daily start overlay */
body.dark-mode #daily-start-overlay.overlay {
    background: rgba(0, 0, 0, 0.75);
}

body.dark-mode #daily-start-overlay .modal-card {
    background: linear-gradient(145deg, #1e293b 0%, #0f172a 100%);
}

body.dark-mode #daily-start-overlay .sp-username,
body.dark-mode #daily-start-overlay h3 {
    color: #fff;
}

body.dark-mode #daily-start-overlay .sp-subtitle {
    color: #94a3b8;
}

body.dark-mode #daily-start-overlay .sp-stats {
    background: #0f172a;
}

body.dark-mode #daily-start-overlay .sp-stats .row {
    background: #1e293b;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

body.dark-mode #daily-start-overlay .sp-stats .label {
    color: #94a3b8;
}

body.dark-mode #daily-start-overlay .sp-stats .value {
    color: #fff;
}

body.dark-mode #daily-start-overlay #daily-cancel-btn {
    background: #334155;
    color: #e2e8f0;
}

body.dark-mode #daily-start-overlay #daily-cancel-btn:hover {
    background: #475569;
}

/* =====================================================================
   DAILY END OVERLAY
   ===================================================================== */

#daily-end-overlay.modal-backdrop {
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

#daily-end-overlay .modal-card {
    background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 20px;
    padding: 32px 40px;
    min-width: 360px;
    max-width: 420px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    text-align: center;
}

#daily-end-overlay .sp-header {
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

#daily-end-overlay .sp-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 4px solid #f59e0b;
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.3);
}

#daily-end-overlay .sp-user {
    text-align: center;
}

#daily-end-overlay .sp-username {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--ink, #174a87);
    margin-bottom: 2px;
}

#daily-end-overlay .sp-subtitle {
    font-size: 0.9rem;
    color: #666;
    font-weight: 500;
}

#daily-end-overlay .sp-stats {
    background: #f1f5f9;
    border-radius: 12px;
    padding: 12px;
    margin: 0 0 12px;
}

#daily-end-overlay .sp-stats .row {
    background: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 12px 14px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

#daily-end-overlay .sp-stats .label {
    font-size: 0.85rem;
    color: #64748b;
}

#daily-end-overlay .sp-stats .value {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--ink, #174a87);
}

#daily-end-overlay h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--ink, #174a87);
    margin: 16px 0 8px;
}

#daily-end-overlay .actions {
    margin-top: 20px;
}

#daily-end-overlay #daily-return-btn {
    width: 100%;
    padding: 14px 24px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--brand-blue, #18a2ee), #0c74b0);
    color: #fff;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(24, 162, 238, 0.4);
    transition: all 0.2s ease;
}

#daily-end-overlay #daily-return-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(24, 162, 238, 0.5);
}

/* Dark mode for daily end overlay */
body.dark-mode #daily-end-overlay.modal-backdrop {
    background: rgba(0, 0, 0, 0.8);
}

body.dark-mode #daily-end-overlay .modal-card {
    background: linear-gradient(145deg, #1e293b 0%, #0f172a 100%);
}

body.dark-mode #daily-end-overlay .sp-username,
body.dark-mode #daily-end-overlay h3 {
    color: #fff;
}

body.dark-mode #daily-end-overlay .sp-subtitle {
    color: #94a3b8;
}

body.dark-mode #daily-end-overlay .sp-stats {
    background: #0f172a;
}

body.dark-mode #daily-end-overlay .sp-stats .row {
    background: #1e293b;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

body.dark-mode #daily-end-overlay .sp-stats .label {
    color: #94a3b8;
}

body.dark-mode #daily-end-overlay .sp-stats .value {
    color: #fff;
}

/* =====================================================================
   DAILY TOP 10 TICKER
   ===================================================================== */

.daily-ticker {
    display: none; /* Hidden by default, shown on desktop only */
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 0 auto;
    padding: 0 20px;
    overflow: hidden;
}

.daily-ticker.ticker-hidden {
    display: none !important;
}

.daily-ticker-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    white-space: nowrap;
}

.daily-ticker-track {
    overflow: hidden;
    height: 22px;
    position: relative;
}

.daily-ticker-content {
    display: flex;
    flex-direction: column;
    transition: transform 0.4s ease-out;
}

.daily-ticker-item {
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.9);
    cursor: pointer;
    transition: color 0.2s;
    height: 22px;
}

.daily-ticker-item:hover {
    color: #10b981;
}

.daily-ticker-rank {
    font-weight: 700;
    color: #fbbf24;
    min-width: 20px;
    text-align: right;
}

.daily-ticker-rank.gold { color: #fbbf24; }
.daily-ticker-rank.silver { color: #cbd5e1; }
.daily-ticker-rank.bronze { color: #f59e0b; }

.daily-ticker-avatar {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    object-fit: cover;
}

.daily-ticker-name {
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 120px;
}

.daily-ticker-score {
    color: #10b981;
    font-weight: 600;
}

/* Only show ticker on desktop */
@media (min-width: 900px) {
    .daily-ticker {
        display: flex;
    }
}

/* =====================================================================
   DAILY MINI-LEADERBOARD ENTRIES
   ===================================================================== */

.daily-lb-entry {
    display: grid;
    grid-template-columns: 28px 32px 1fr auto;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
}

.daily-lb-entry.is-self {
    background: rgba(20, 135, 198, 0.1);
}

.daily-lb-avatar-wrap {
    width: 28px;
    height: 28px;
    border-radius: 12%;
    overflow: hidden;
    background: var(--surface-2, #f0f0f0);
    display: flex;
    align-items: center;
    justify-content: center;
}

.daily-lb-avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.daily-lb-entry .mini-lb-name.player-name-clickable {
    cursor: pointer;
    transition: color 0.2s;
}

.daily-lb-entry .mini-lb-name.player-name-clickable:hover {
    color: #1487c6;
    text-decoration: underline;
}

/* =====================================================================
   REWARDS INFO MODAL
   ===================================================================== */

.rewards-info-modal {
    display: flex;
    flex-direction: column;
    gap: 16px;
    text-align: left;
}

.reward-section {
    background: rgba(0, 0, 0, 0.03);
    border-radius: 8px;
    padding: 12px;
}

body.dark-mode .reward-section {
    background: rgba(255, 255, 255, 0.05);
}

.reward-section-title {
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--ink-90, #1a1a1a);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

body.dark-mode .reward-section-title {
    color: #fff;
}

.reward-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
    font-size: 0.85rem;
    color: var(--ink-70, #555);
}

body.dark-mode .reward-row {
    color: rgba(255, 255, 255, 0.8);
}

.reward-coins {
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: 600;
    color: #d97706;
}

body.dark-mode .reward-coins {
    color: #ffd966;
}

.reward-coins .inline-coin {
    width: 14px;
    height: 14px;
}

.reward-note {
    font-size: 0.75rem;
    color: var(--ink-50, #888);
    font-style: italic;
    margin-top: 6px;
}

body.dark-mode .reward-note {
    color: rgba(255, 255, 255, 0.5);
}

/* =====================================================================
   DARK MODE ACCESSIBILITY FIXES
   ===================================================================== */

/* Daily Challenge - FIX UNREADABLE TEXT */
body.dark-mode #daily-page h1,
body.dark-mode #daily-page h2,
body.dark-mode #daily-page h3 {
    color: #ffffff !important;
}

body.dark-mode #daily-page p,
body.dark-mode #daily-page div {
    color: var(--text-primary) !important;
}

/* Legacy daily card styling - only for non-section cards */
body.dark-mode .daily-card:not(.daily-section) {
    background: var(--card-bg) !important;
    border: 1px solid var(--border-color) !important;
}

body.dark-mode .daily-info-card {
    background: rgba(36, 43, 61, 0.95) !important;
    border: 1px solid var(--border-color) !important;
}

body.dark-mode .daily-info-card h2,
body.dark-mode .daily-info-card h3 {
    color: #ffffff !important;
}

/* Daily countdown label - improve contrast */
body.dark-mode .daily-countdown .countdown-label {
    color: #a0aec0;
}

body.dark-mode .daily-countdown .countdown-time {
    color: #4fc3f7;
}

/* Daily play button - ensure it's visible */
body.dark-mode #daily-play-btn,
body.dark-mode .daily-play-btn {
    background: linear-gradient(135deg, #1487c6, #0d5f8f) !important;
    color: #ffffff !important;
    border: none !important;
}

body.dark-mode #daily-play-btn:hover,
body.dark-mode .daily-play-btn:hover {
    background: linear-gradient(135deg, #18a2ee, #1487c6) !important;
}

/* Daily table rows hover */
body.dark-mode .daily-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* Daily already played message */
body.dark-mode .daily-status-message-inline {
    background: rgba(16, 185, 129, 0.15);
    border-color: rgba(16, 185, 129, 0.3);
}
