/* ===========================================
   DAILY CHALLENGE - Premium Styles
   Codzienne wyzwanie słowne
   =========================================== */

/* === CSS Variables === */
:root {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-card: rgba(30, 41, 59, 0.8);
    --bg-glass: rgba(15, 23, 42, 0.9);

    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    --accent-amber: #f59e0b;
    --accent-amber-light: #fbbf24;
    --accent-amber-glow: rgba(245, 158, 11, 0.3);

    --accent-green: #10b981;
    --accent-green-glow: rgba(16, 185, 129, 0.3);

    --accent-red: #ef4444;
    --accent-blue: #3b82f6;
    --accent-purple: #8b5cf6;

    --easy-bg: rgba(16, 185, 129, 0.15);
    --easy-border: rgba(16, 185, 129, 0.4);
    --easy-text: #34d399;

    --hard-bg: rgba(239, 68, 68, 0.15);
    --hard-border: rgba(239, 68, 68, 0.4);
    --hard-text: #f87171;

    --tile-bg: #fef3c7;
    --tile-text: #78350f;
    --tile-border: #d97706;

    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;

    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.15);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.25);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.35);
    --shadow-glow: 0 0 30px var(--accent-amber-glow);

    --font-main: 'Inter', 'Open Sans', system-ui, sans-serif;
    --font-display: 'Outfit', 'Inter', sans-serif;
}

/* === Reset & Base === */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
    overflow-x: hidden;
}

/* === Background Pattern === */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 20%, rgba(245, 158, 11, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(139, 92, 246, 0.06) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(59, 130, 246, 0.04) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

/* === Main Container === */
.daily-container {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px;
    min-height: 100vh;
}

/* === Header === */
.daily-header {
    text-align: center;
    margin-bottom: 40px;
    animation: fadeInDown 0.6s ease-out;
}

.daily-header h1 {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--accent-amber-light), var(--accent-amber), #dc2626);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.daily-header .subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.daily-date {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-card);
    padding: 8px 16px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-weight: 600;
    color: var(--accent-amber);
}

.daily-date i {
    font-size: 1.2rem;
}

/* === User Info Bar === */
.user-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 24px;
    padding: 12px 20px;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.06);
    animation: fadeIn 0.4s ease-out 0.1s both;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.user-info i {
    font-size: 1.4rem;
    color: var(--text-muted);
}

.user-info span.logged-in {
    color: var(--accent-amber);
    font-weight: 600;
}

.login-link {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: linear-gradient(135deg, var(--accent-amber), #dc2626);
    border-radius: var(--radius-sm);
    color: white;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.2s;
}

.login-link:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.login-link i {
    font-size: 1rem;
}

/* === Challenge Selection === */
.challenge-selection {
    text-align: center;
    animation: fadeIn 0.4s ease-out;
}

.challenge-selection h2 {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.challenge-selection h2 i {
    color: var(--accent-amber);
}

.selection-subtitle {
    color: var(--text-muted);
    margin-bottom: 24px;
}

.challenge-list {
    max-width: 600px;
    margin: 0 auto 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.challenge-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s;
}

.challenge-item:hover {
    background: var(--bg-secondary);
    border-color: var(--accent-amber);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.challenge-item.today {
    border-color: var(--accent-amber);
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(220, 38, 38, 0.05));
}

.challenge-date {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: var(--text-primary);
}

.challenge-date i {
    font-size: 1.3rem;
    color: var(--accent-amber);
}

.challenge-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.word-count {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.today-badge {
    background: linear-gradient(135deg, var(--accent-amber), #dc2626);
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.challenge-item>i:last-child {
    color: var(--text-muted);
    font-size: 1.3rem;
}

.empty-list {
    padding: 40px 20px;
    text-align: center;
    color: var(--text-muted);
}

.empty-list i {
    font-size: 3rem;
    opacity: 0.5;
    margin-bottom: 12px;
}

.refresh-btn,
.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.refresh-btn:hover,
.back-btn:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border-color: var(--accent-amber);
}

.refresh-btn i,
.back-btn i {
    font-size: 1.1rem;
}

.back-btn {
    margin-bottom: 24px;
}

/* === Stats Button === */
.stats-btn-container {
    margin: 32px 0 48px;
    display: flex;
    justify-content: center;
    animation: fadeIn 0.8s ease-out 0.3s both;
}

.stats-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 20px 48px;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    color: white;
    text-decoration: none;
    font-size: 1.25rem;
    font-weight: 800;
    border-radius: var(--radius-lg);
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 10px 30px -10px rgba(59, 130, 246, 0.5);
}

.stats-btn:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 20px 40px -10px rgba(59, 130, 246, 0.6);
    filter: brightness(1.1);
}

.stats-btn i {
    font-size: 1.6rem;
}

.stats-btn .btn-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.2;
}

.stats-btn .btn-subtitle {
    font-size: 0.75rem;
    font-weight: 500;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* === Timer === */
.sticky-timer {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 2px solid var(--accent-amber);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    transform: translateY(-100%);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.sticky-timer.visible {
    transform: translateY(0);
}

.timer-content {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
}

.timer-content i {
    color: var(--accent-amber);
}

.timer-value {
    color: var(--accent-amber);
    min-width: 60px;
}

/* === Start Game Button === */
.start-game-container {
    margin: 16px 0 32px;
    display: flex;
    justify-content: center;
    display: none;
    /* Hidden by default, shown when challenge selected */
}

.start-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 24px 64px;
    background: linear-gradient(135deg, var(--accent-amber), #dc2626);
    color: white;
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: 800;
    border-radius: var(--radius-xl);
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 10px 40px -10px rgba(245, 158, 11, 0.6);
    animation: pulseGlow 2s infinite;
}

@keyframes pulseGlow {
    0% {
        box-shadow: 0 10px 40px -10px rgba(245, 158, 11, 0.6);
    }

    50% {
        box-shadow: 0 10px 60px 0px rgba(245, 158, 11, 0.8);
    }

    100% {
        box-shadow: 0 10px 40px -10px rgba(245, 158, 11, 0.6);
    }
}

.start-btn:hover {
    transform: translateY(-4px) scale(1.05);
    filter: brightness(1.1);
}

/* === Hidden Tiles State === */
.tiles-row.hidden-tiles .tile {
    color: transparent !important;
    background: var(--bg-secondary) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    box-shadow: none !important;
    transform: rotateY(180deg);
}

.tiles-row.hidden-tiles .tile::after {
    content: '?';
    position: absolute;
    color: var(--text-muted);
    font-size: 1.2rem;
    transform: rotateY(-180deg);
}

.tiles-row .tile {
    transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275), background 0.3s, color 0.3s;
    position: relative;
    transform-style: preserve-3d;
}

/* === Stats Bar === */
.stats-bar {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-bottom: 32px;
    flex-wrap: wrap;
    animation: fadeIn 0.6s ease-out 0.2s both;
}

.stat-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    padding: 16px 24px;
    text-align: center;
    min-width: 120px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--accent-amber);
    line-height: 1.2;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 4px;
}

.stat-card.streak .stat-value {
    color: var(--accent-green);
}

/* === Length Section === */
.length-section {
    margin-bottom: 40px;
    animation: fadeInUp 0.5s ease-out both;
}

.length-section:nth-child(1) {
    animation-delay: 0.1s;
}

.length-section:nth-child(2) {
    animation-delay: 0.15s;
}

.length-section:nth-child(3) {
    animation-delay: 0.2s;
}

.length-section:nth-child(4) {
    animation-delay: 0.25s;
}

.length-section:nth-child(5) {
    animation-delay: 0.3s;
}

.length-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.length-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--accent-amber), #dc2626);
    border-radius: var(--radius-md);
    font-size: 1.4rem;
    font-weight: 800;
    color: white;
    box-shadow: var(--shadow-glow);
}

.length-title {
    flex: 1;
}

.length-title h2 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
}

.length-title span {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.length-progress {
    text-align: right;
}

.length-progress-bar {
    width: 100px;
    height: 6px;
    background: var(--bg-secondary);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 4px;
}

.length-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-green), var(--accent-amber));
    border-radius: 3px;
    transition: width 0.5s ease;
}

.length-progress-text {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* === Difficulty Columns === */
.difficulty-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

@media (max-width: 768px) {
    .difficulty-columns {
        grid-template-columns: 1fr;
    }
}

.difficulty-column {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border-radius: var(--radius-lg);
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.difficulty-column.easy {
    border-left: 3px solid var(--easy-border);
}

.difficulty-column.hard {
    border-left: 3px solid var(--hard-border);
}

.difficulty-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.difficulty-column.easy .difficulty-label {
    color: var(--easy-text);
}

.difficulty-column.hard .difficulty-label {
    color: var(--hard-text);
}

.difficulty-label i {
    font-size: 1.1rem;
}

/* === Word Rack === */
.word-rack {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.rack-item {
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.rack-item:hover {
    background: rgba(0, 0, 0, 0.35);
    border-color: rgba(255, 255, 255, 0.1);
    transform: translateX(4px);
}

.rack-item.solved {
    background: var(--easy-bg);
    border-color: var(--easy-border);
}

.rack-item.active {
    border-color: var(--accent-amber);
    box-shadow: 0 0 20px var(--accent-amber-glow);
}

.rack-position {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-muted);
    flex-shrink: 0;
}

.rack-item.solved .rack-position {
    background: var(--accent-green);
    color: white;
}

.rack-item.solved .rack-position i {
    font-size: 1rem;
}

.rack-item.solved .tiles-row {
    pointer-events: none;
    cursor: default;
}

.rack-item.solved .tile {
    cursor: default;
    box-shadow: none;
    transform: none !important;
    background: linear-gradient(135deg, #34d399, #10b981);
    border-color: #059669;
    color: white;
}

/* === Tiles Row === */
.tiles-row {
    display: flex;
    gap: 4px;
    flex: 1;
}

.tile {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 40px;
    background: var(--tile-bg);
    color: var(--tile-text);
    font-size: 1.2rem;
    font-weight: 800;
    border-radius: 4px;
    border: 2px solid var(--tile-border);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    text-transform: uppercase;
    transition: transform 0.15s, box-shadow 0.15s;
    user-select: none;
}

.tile:hover {
    transform: scale(1.08) translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.tile.blank {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: transparent;
}

.tile.fixed {
    background: linear-gradient(135deg, #34d399, #10b981);
    border-color: #059669;
    color: white;
}

.tile.hint {
    animation: hintPulse 0.5s ease-out;
    background: linear-gradient(135deg, var(--accent-amber-light), var(--accent-amber));
    border-color: #b45309;
}

@keyframes hintPulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.15);
        box-shadow: 0 0 20px var(--accent-amber-glow);
    }
}

/* === Word Actions === */
.word-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.08);
    border: none;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
}

.action-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    color: var(--text-primary);
}

.action-btn.hint:hover {
    background: var(--accent-amber-glow);
    color: var(--accent-amber);
}

.action-btn.shuffle:hover {
    background: rgba(139, 92, 246, 0.2);
    color: var(--accent-purple);
}

/* === Active Game Panel === */
.game-panel {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-glass);
    backdrop-filter: blur(30px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 24px;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 100;
}

.game-panel.active {
    transform: translateY(0);
}

.game-panel-content {
    max-width: 600px;
    margin: 0 auto;
}

.game-tiles {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 20px;
}

.game-tiles .tile {
    width: 52px;
    height: 58px;
    font-size: 1.6rem;
    cursor: grab;
}

.game-tiles .tile:active {
    cursor: grabbing;
}

.game-controls {
    display: flex;
    justify-content: center;
    gap: 16px;
}

.game-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--bg-secondary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.game-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.game-btn.primary {
    background: linear-gradient(135deg, var(--accent-amber), #dc2626);
    border-color: transparent;
}

.game-btn.primary:hover {
    box-shadow: var(--shadow-glow);
}

/* === Definition Panel === */
.definition-content {
    padding: 20px;
    max-width: 600px;
    margin: 0 auto;
}

.definition-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.definition-header h3 {
    font-size: 1.5rem;
    color: var(--accent-amber);
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
}

.close-btn {
    background: var(--bg-secondary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
}

.close-btn:hover {
    background: rgba(220, 38, 38, 0.2);
    color: #ef4444;
    border-color: #ef4444;
}

.close-btn i {
    font-size: 1.5rem;
}

.definition-body {
    color: var(--text-secondary);
    line-height: 1.6;
}

.definition-body a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: var(--bg-secondary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    color: var(--accent-amber);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s;
    margin-top: 12px;
}

.definition-body a:hover {
    background: var(--bg-card);
    border-color: var(--accent-amber);
    transform: translateY(-2px);
}

/* === History Panel === */
.history-toggle {
    text-align: center;
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.history-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.history-btn:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border-color: var(--accent-amber);
}

.history-btn i {
    font-size: 1.2rem;
}

.history-panel {
    display: none;
    margin-top: 24px;
}

.history-panel.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

.history-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
}

.history-item {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-md);
    padding: 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.history-item:hover {
    background: var(--bg-secondary);
    border-color: var(--accent-amber);
    transform: translateY(-2px);
}

.history-item.current {
    border-color: var(--accent-amber);
    background: var(--accent-amber-glow);
}

.history-date {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.history-status {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.history-item.completed .history-status {
    color: var(--accent-green);
}

/* === Loading State === */
.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    gap: 20px;
}

.loading-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--bg-secondary);
    border-top-color: var(--accent-amber);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-text {
    color: var(--text-muted);
    font-size: 1rem;
}

/* === Empty State === */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 1.3rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 0.95rem;
}

/* === Toast Notifications === */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.toast {
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    padding: 16px 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideInRight 0.4s ease, fadeOut 0.4s ease 2.6s forwards;
    box-shadow: var(--shadow-lg);
}

.toast.success {
    border-left: 3px solid var(--accent-green);
}

.toast.success i {
    color: var(--accent-green);
}

.toast.error {
    border-left: 3px solid var(--accent-red);
}

.toast.error i {
    color: var(--accent-red);
}

.toast i {
    font-size: 1.3rem;
}

.toast-message {
    font-size: 0.95rem;
    color: var(--text-primary);
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeOut {
    to {
        opacity: 0;
        transform: translateX(20px);
    }
}

/* === Animations === */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* === Responsive === */
@media (max-width: 640px) {
    .daily-container {
        padding: 16px;
    }

    .daily-header h1 {
        font-size: 1.8rem;
    }

    .stats-bar {
        gap: 12px;
    }

    .stat-card {
        padding: 12px 16px;
        min-width: 90px;
    }

    .stat-value {
        font-size: 1.4rem;
    }

    .tile {
        width: 30px;
        height: 34px;
        font-size: 1rem;
    }

    .game-tiles .tile {
        width: 42px;
        height: 48px;
        font-size: 1.3rem;
    }

    .length-badge {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
}

/* === Scrollbar === */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--text-muted);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}