/**
 * Main Stylesheet
 * Uses CSS variables for theming - values set by theme-manager.js
 */

:root {
    /* Theme colors - set dynamically by ThemeManager */
    --bg-primary: #0a0e27;
    --bg-secondary: rgba(17, 24, 39, 0.95);
    --accent-primary: #6366f1;
    --accent-secondary: #8b5cf6;
    --text-primary: #ffffff;
    --text-secondary: #9ca3af;
    --card-border: rgba(99, 102, 241, 0.3);
    --card-glow: rgba(99, 102, 241, 0.3);
    --button-bg: rgba(99, 102, 241, 0.15);
    --button-border: rgba(99, 102, 241, 0.4);
    --button-hover-bg: rgba(99, 102, 241, 0.25);
    --button-hover-border: rgba(99, 102, 241, 0.7);
    --button-glow: rgba(99, 102, 241, 0.4);
}

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

html, body {
    min-height: 100%;
    margin: 0;
    background: var(--bg-primary);
    overflow-x: hidden;
    overflow-y: auto;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    color: var(--text-primary);
    cursor: auto;
}

/* Game Background */
#gameStage {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

#powderCanvas {
    width: 100%;
    height: 100%;
    display: block;
    filter: blur(20px) saturate(0.5) brightness(0.4);
    transform: translateZ(0);
    transition: filter 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
    background: #000;
    position: absolute;
    top: 0;
    left: 0;
}

#powderCanvas.revealed {
    filter: blur(0px) saturate(1) brightness(1);
}

/* Particle Effects Canvas (hidden by default, enabled via config.json) */
#particleCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
    transition: opacity 0.5s ease;
    display: none; /* Hidden by default */
}

#particleCanvas.game-active {
    opacity: 0.2;
}

/* Custom Cursor (hidden by default, enabled via config.json) */
.cursor {
    position: fixed;
    width: 20px;
    height: 20px;
    border: 2px solid var(--accent-primary);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transition: transform 0.15s ease;
    mix-blend-mode: difference;
    display: none; /* Hidden by default */
}

.cursor-follower {
    position: fixed;
    width: 8px;
    height: 8px;
    background: var(--accent-primary);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transition: transform 0.2s ease;
    display: none; /* Hidden by default */
}

/* Content Overlay */
.content-overlay {
    position: relative;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
    backdrop-filter: blur(2px);
    transition: all 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    pointer-events: all;
    padding: 40px 0;
}

.content-overlay.hidden {
    position: fixed;
    inset: 0;
    opacity: 0;
    transform: scale(0.8) translateY(50px);
    pointer-events: none;
}

.container {
    max-width: 520px;
    width: 100%;
    padding: 20px;
}

/* Card */
.card {
    background: var(--bg-secondary);
    backdrop-filter: blur(20px);
    border: 1px solid var(--card-border);
    border-radius: 24px;
    padding: 50px 40px;
    box-shadow:
        0 0 80px var(--card-glow),
        inset 0 0 40px var(--card-glow);
    animation: fadeIn 0.8s ease-out;
    transition: transform 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow:
        0 10px 100px var(--card-glow),
        inset 0 0 40px var(--card-glow);
}

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

/* Profile Section */
.profile {
    text-align: center;
    margin-bottom: 40px;
}

.avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    font-weight: bold;
    color: white;
    box-shadow:
        0 0 40px var(--card-glow),
        0 0 80px var(--card-glow);
    animation: glow 3s ease-in-out infinite;
    position: relative;
    overflow: hidden;
}

/* Image-based avatar */
.avatar.avatar-image {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border: 3px solid var(--accent-primary);
    animation: none !important;
}

/* Disable shimmer effect for image avatars */
.avatar.avatar-image::before {
    display: none;
}

/* Text-based avatar */
.avatar.avatar-text {
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
}

.avatar::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent,
        rgba(255, 255, 255, 0.15),
        transparent
    );
    animation: shimmer 3s infinite;
}

@keyframes glow {
    0%, 100% {
        box-shadow:
            0 0 40px var(--card-glow),
            0 0 80px var(--card-glow);
    }
    50% {
        box-shadow:
            0 0 60px var(--card-glow),
            0 0 120px var(--card-glow);
    }
}

@keyframes shimmer {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(50%, 50%) rotate(360deg); }
}

.name {
    font-size: 32px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
}

.title {
    font-size: 16px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Links */
.links {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 30px;
}

.link-button {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 28px;
    background: var(--button-bg);
    border: 2px solid var(--button-border);
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 16px;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.link-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, var(--button-glow), transparent);
    transition: left 0.6s ease;
}

.link-button:hover::before {
    left: 100%;
}

.link-button:hover {
    background: var(--button-hover-bg);
    border-color: var(--button-hover-border);
    transform: translateX(5px);
    box-shadow:
        0 0 30px var(--button-glow),
        inset 0 0 20px var(--button-glow);
}

.link-button:active {
    transform: translateX(3px);
}

.link-icon {
    margin-right: 12px;
    font-size: 24px;
    filter: drop-shadow(0 0 8px var(--card-glow));
}

/* Play Section */
.play-section {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid var(--card-border);
}

.play-hint {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 15px;
}

.play-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 18px 40px;
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
    border: none;
    color: white;
    border-radius: 50px;
    font-weight: 700;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow:
        0 0 40px var(--card-glow),
        0 10px 30px rgba(0, 0, 0, 0.3);
    animation: pulse 2s ease-in-out infinite;
}

.play-button:hover {
    transform: scale(1.05);
    box-shadow:
        0 0 60px var(--card-glow),
        0 15px 40px rgba(0, 0, 0, 0.4);
}

.play-button:active {
    transform: scale(0.98);
}

.play-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    animation: none;
}

.play-button:disabled:hover {
    transform: scale(1);
    box-shadow:
        0 0 40px var(--card-glow),
        0 10px 30px rgba(0, 0, 0, 0.3);
}

@keyframes pulse {
    0%, 100% {
        box-shadow:
            0 0 40px var(--card-glow),
            0 10px 30px rgba(0, 0, 0, 0.3);
    }
    50% {
        box-shadow:
            0 0 60px var(--card-glow),
            0 15px 40px rgba(0, 0, 0, 0.4);
    }
}

.play-icon {
    margin-right: 10px;
    font-size: 24px;
}

/* System Buttons */
.system-buttons {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-top: 15px;
}

.system-button {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 12px;
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.2);
    color: var(--text-secondary);
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.system-button:hover {
    background: rgba(99, 102, 241, 0.15);
    border-color: rgba(99, 102, 241, 0.4);
    color: var(--text-primary);
    transform: translateY(-1px);
}

.system-button:active {
    transform: translateY(0);
}

.system-button-icon {
    font-size: 14px;
    opacity: 0.8;
}

.system-button-text {
    font-size: 11px;
    letter-spacing: 0.3px;
}

/* Return Button */
.return-button {
    position: fixed;
    top: 30px;
    right: 30px;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: var(--accent-primary);
    backdrop-filter: blur(10px);
    border: 3px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    box-shadow:
        0 0 40px var(--card-glow),
        0 10px 30px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    transition: all 0.3s ease;
    opacity: 0.5;
}

.return-button.visible {
    display: flex;
}

.return-button:hover {
    transform: scale(1.1);
    background: var(--accent-primary);
    box-shadow:
        0 0 60px var(--card-glow),
        0 15px 40px rgba(0, 0, 0, 0.4);
    opacity: 1;
}

.return-button:active {
    transform: scale(0.95);
}

/* Footer */
.footer {
    text-align: center;
    margin-top: 25px;
    color: #6b7280;
    font-size: 14px;
}

/* Staggered Animations */
.link-button:nth-child(1) { animation: slideIn 0.5s ease-out 0.2s both; }
.link-button:nth-child(2) { animation: slideIn 0.5s ease-out 0.3s both; }
.link-button:nth-child(3) { animation: slideIn 0.5s ease-out 0.4s both; }
.link-button:nth-child(4) { animation: slideIn 0.5s ease-out 0.5s both; }

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Responsive */
@media (max-width: 768px) {
    body {
        cursor: auto;
    }

    .cursor, .cursor-follower {
        display: none;
    }

    .container {
        padding: 15px;
    }

    .card {
        padding: 40px 30px;
    }

    .name {
        font-size: 26px;
    }

    .return-button {
        width: 60px;
        height: 60px;
        font-size: 28px;
        top: 20px;
        right: 20px;
    }

    /* Modal responsive */
    .modal-container {
        width: 95%;
        max-height: 85vh;
    }

    .modal-header {
        padding: 20px;
    }

    .modal-title {
        font-size: 20px;
    }

    .modal-body {
        padding: 20px;
    }

    .theme-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .theme-card {
        padding: 20px;
    }
}

@media (hover: none) {
    body {
        cursor: auto;
    }

    .cursor, .cursor-follower {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    #powderCanvas,
    .content-overlay,
    .card,
    .play-button,
    .return-button {
        transition: none !important;
        animation: none !important;
    }
}

/* Theme Selector Modal */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-backdrop.active {
    opacity: 1;
    visibility: visible;
}

.modal-container {
    background: var(--bg-secondary);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
    box-shadow:
        0 0 80px var(--card-glow),
        inset 0 0 40px rgba(99, 102, 241, 0.1);
    transform: scale(0.9) translateY(20px);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.modal-backdrop.active .modal-container {
    transform: scale(1) translateY(0);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 25px 30px;
    border-bottom: 1px solid var(--card-border);
}

.modal-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.modal-close {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.3);
    color: var(--text-primary);
    font-size: 28px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    line-height: 1;
    padding: 0;
}

.modal-close:hover {
    background: rgba(99, 102, 241, 0.2);
    border-color: rgba(99, 102, 241, 0.5);
    transform: rotate(90deg);
}

.modal-body {
    padding: 30px;
    overflow-y: auto;
    max-height: calc(80vh - 100px);
}

.theme-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.theme-card {
    background: rgba(99, 102, 241, 0.05);
    border: 2px solid rgba(99, 102, 241, 0.2);
    border-radius: 16px;
    padding: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.1), transparent);
    transition: left 0.5s ease;
}

.theme-card:hover::before {
    left: 100%;
}

.theme-card:hover {
    background: rgba(99, 102, 241, 0.1);
    border-color: rgba(99, 102, 241, 0.4);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.3);
}

.theme-card.active {
    background: rgba(99, 102, 241, 0.15);
    border-color: var(--accent-primary);
    box-shadow:
        0 0 30px var(--card-glow),
        inset 0 0 20px rgba(99, 102, 241, 0.2);
}

.theme-card.active::after {
    display: none;
}

.theme-card-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 0;
}

.theme-card-emoji {
    font-size: 36px;
    filter: drop-shadow(0 0 10px var(--card-glow));
}

.theme-card-name {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
}

.theme-card-description {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0;
}

.theme-card-preview {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(99, 102, 241, 0.2);
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.theme-color-dot {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Custom Message Modal */
.modal-container.modal-small {
    max-width: 400px;
}

.modal-container.modal-medium {
    max-width: 500px;
}

.modal-body.text-center {
    text-align: center;
}

.custom-message-emoji,
.blocked-link-emoji {
    font-size: 64px;
    margin-bottom: 20px;
    animation: bounceIn 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes bounceIn {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.custom-message-title,
.blocked-link-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 15px 0;
}

.custom-message-text,
.blocked-link-message {
    font-size: 16px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0 0 25px 0;
}

.modal-button {
    background: var(--accent-primary);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 12px 32px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.modal-button:hover {
    background: var(--accent-secondary);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

.modal-button:active {
    transform: translateY(0);
}

/* Blocked Link Alternatives */
.blocked-link-alternatives {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 25px;
}

.alternative-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    background: rgba(99, 102, 241, 0.1);
    border: 2px solid rgba(99, 102, 241, 0.3);
    border-radius: 12px;
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
}

.alternative-link:hover {
    background: rgba(99, 102, 241, 0.2);
    border-color: var(--accent-primary);
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.alternative-icon {
    font-size: 20px;
    min-width: 24px;
    text-align: center;
}

.alternative-text {
    font-size: 15px;
    font-weight: 500;
}

/* Modal Close Button Positioning for Small Modals */
.modal-small .modal-close,
.modal-medium .modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
}

/* ===================================
   STATISTICS MODAL
   =================================== */

.modal-container.modal-large {
    max-width: 850px;
    width: 90%;
}

/* Loading State */
.stats-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 50px 20px;
    gap: 15px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(99, 102, 241, 0.2);
    border-top: 3px solid var(--accent-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.stats-loading p {
    color: var(--text-secondary);
    font-size: 14px;
}

/* Error State */
.stats-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 50px 20px;
    gap: 12px;
}

.stats-error-icon {
    font-size: 42px;
}

.stats-error-message {
    color: var(--text-secondary);
    font-size: 14px;
    text-align: center;
}

/* Statistics Content */
.stats-content {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

/* Overview Cards */
.stats-overview {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 5px;
}

.stat-card {
    background: rgba(99, 102, 241, 0.05);
    border: 2px solid rgba(99, 102, 241, 0.2);
    border-radius: 10px;
    padding: 16px 12px;
    text-align: center;
    transition: all 0.3s ease;
}

.stat-card:hover {
    background: rgba(99, 102, 241, 0.1);
    border-color: var(--accent-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.2);
}

.stat-icon {
    font-size: 28px;
    margin-bottom: 8px;
}

.stat-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--accent-primary);
    margin-bottom: 4px;
    line-height: 1.2;
}

.stat-label {
    font-size: 11px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

/* Detailed Stats */
.stats-details {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.stats-section {
    background: rgba(99, 102, 241, 0.05);
    border: 2px solid rgba(99, 102, 241, 0.15);
    border-radius: 10px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    min-height: 120px;
}

.stats-section-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.stats-section-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
    justify-content: center;
}

.stats-placeholder {
    color: var(--text-secondary);
    font-size: 13px;
    font-style: italic;
    text-align: center;
    padding: 8px 0;
}

.stats-highlight {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 8px;
}

.stats-game-name,
.stats-session-time {
    font-size: 16px;
    font-weight: 600;
    color: var(--accent-primary);
    line-height: 1.3;
}

.stats-game-time {
    font-size: 13px;
    color: var(--text-secondary);
}

.stats-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: rgba(99, 102, 241, 0.08);
    border-radius: 6px;
    transition: all 0.2s ease;
}

.stats-list-item:hover {
    background: rgba(99, 102, 241, 0.15);
    transform: translateX(3px);
}

.stats-list-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    text-transform: capitalize;
}

.stats-list-count {
    font-size: 12px;
    color: var(--text-secondary);
    background: rgba(99, 102, 241, 0.15);
    padding: 3px 10px;
    border-radius: 10px;
    font-weight: 500;
}

/* Footer */
.stats-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    border-top: 1px solid rgba(99, 102, 241, 0.2);
    flex-wrap: wrap;
    gap: 12px;
}

.stats-last-updated {
    font-size: 12px;
    color: var(--text-secondary);
}

.stats-last-updated span {
    color: var(--text-primary);
    font-weight: 500;
}

.stats-refresh-btn {
    padding: 7px 14px;
    background: rgba(99, 102, 241, 0.15);
    border: 2px solid rgba(99, 102, 241, 0.3);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.stats-refresh-btn:hover {
    background: rgba(99, 102, 241, 0.25);
    border-color: var(--accent-primary);
    transform: scale(1.05);
}

.stats-refresh-btn:active {
    transform: scale(0.95);
}

/* Responsive Design */
@media (max-width: 768px) {
    .modal-container.modal-large {
        max-width: 100%;
        width: 95%;
        margin: 15px;
    }

    .stats-overview {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .stat-card {
        padding: 12px 10px;
    }

    .stat-value {
        font-size: 20px;
    }

    .stat-icon {
        font-size: 24px;
    }

    .stat-label {
        font-size: 10px;
    }

    .stats-details {
        gap: 10px;
    }

    .stats-section {
        padding: 14px;
        min-height: 110px;
    }

    .stats-section-title {
        font-size: 14px;
        margin-bottom: 10px;
    }
}

@media (max-width: 600px) {
    .stats-details {
        grid-template-columns: 1fr;
    }

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

    .stats-footer {
        flex-direction: column;
        align-items: stretch;
    }

    .stats-refresh-btn {
        width: 100%;
    }

    .stats-content {
        gap: 20px;
    }
}
