/* Custom Premium Design System - Panini 2026 Sticker Organizer */
:root {
    --bg-main: #0b0f19;
    --bg-card: #151d30;
    --bg-input: #1e2942;
    --border: #2a3a5c;
    --border-soft: rgba(255, 255, 255, 0.06);
    
    /* Neon Accents */
    --accent: #fbbf24; /* Gold/Yellow for album crests */
    --accent-rgb: 251, 191, 36;
    
    --primary: #10b981; /* Emerald green for owned stickers */
    --primary-glow: rgba(16, 185, 129, 0.15);
    
    --secondary: #8b5cf6; /* Purple for duplicates */
    --secondary-glow: rgba(139, 92, 246, 0.15);
    
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Quicksand', sans-serif;
    
    --shadow-premium: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 20px rgba(16, 185, 129, 0.2);
}

/* Reset & Base */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.5;
    min-height: 100vh;
}

/* Header Stylings */
.app-header {
    background-color: var(--bg-card);
    border-bottom: 2px solid var(--border);
    padding: 10px 16px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.header-logo img {
    height: 38px;
    display: block;
}

.header-title-box h1 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--accent);
    text-shadow: 0 0 8px rgba(251, 191, 36, 0.2);
}

.header-user-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-greeting {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 600;
}

.btn-logout {
    background: none;
    border: none;
    color: #ef4444;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 4px 8px;
    transition: transform 0.2s ease;
}

.btn-logout:hover {
    transform: scale(1.1);
}

/* Viewport wrapper */
.app-viewport {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px;
    width: 100%;
}

/* Authentication Screen */
.auth-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 0;
    min-height: calc(100vh - 120px);
}

.auth-card {
    background-color: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: 28px;
    box-shadow: var(--shadow-premium);
    padding: 32px 24px;
    width: 100%;
    max-width: 420px;
}

.auth-header {
    text-align: center;
    margin-bottom: 24px;
}

.auth-icon-badge {
    font-size: 3rem;
    margin-bottom: 12px;
}

.auth-header h2 {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 800;
    margin-bottom: 8px;
}

.auth-header p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
}

.form-input {
    background-color: var(--bg-input);
    border: 2px solid var(--border);
    border-radius: 12px;
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 1rem;
    padding: 12px 16px;
    width: 100%;
    outline: none;
    transition: border-color 0.2s ease;
}

.form-input:focus {
    border-color: var(--accent);
}

.btn-submit {
    background: linear-gradient(135deg, var(--accent) 0%, #d97706 100%);
    border: none;
    border-radius: 14px;
    color: #000;
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 800;
    padding: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 8px;
    box-shadow: 0 4px 12px rgba(251, 191, 36, 0.3);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-submit:active {
    transform: translateY(2px);
    box-shadow: 0 2px 6px rgba(251, 191, 36, 0.2);
}

.auth-footer {
    border-top: 1px solid var(--border-soft);
    margin-top: 24px;
    padding-top: 16px;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-align: center;
    line-height: 1.4;
}

/* Alerts */
.alert {
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-danger {
    background-color: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #f87171;
}

.alert-success {
    background-color: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #34d399;
}

/* Dashboard Styles */
.dashboard-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Statistics Panel */
.stats-panel {
    background-color: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: 24px;
    padding: 20px;
    box-shadow: var(--shadow-premium);
}

.stats-progress-box {
    margin-bottom: 20px;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.progress-title {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.05rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.progress-percentage {
    font-family: var(--font-heading);
    font-weight: 800;
    color: var(--primary);
    font-size: 1.2rem;
}

.progress-bar-container {
    background-color: var(--bg-input);
    border-radius: 99px;
    height: 12px;
    overflow: hidden;
    width: 100%;
}

.progress-bar-fill {
    background: linear-gradient(90deg, var(--primary) 0%, #34d399 100%);
    border-radius: 99px;
    height: 100%;
    box-shadow: var(--shadow-glow);
    transition: width 0.4s cubic-bezier(0.1, 0.8, 0.25, 1);
}

.stats-counters-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

@media (min-width: 768px) {
    .stats-counters-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.stat-card {
    background-color: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 14px;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 80px;
}

.stat-num {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 800;
}

.stat-label {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-top: 4px;
}

.stat-tengo .stat-num { color: var(--primary); }
.stat-faltan .stat-num { color: #f87171; }
.stat-repetidas .stat-num { color: var(--secondary); }

/* Search and Filters Bar */
.search-filters-bar {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

@media (min-width: 768px) {
    .search-filters-bar {
        flex-direction: row;
        align-items: center;
    }
}

.search-box-wrapper {
    position: relative;
    flex: 1;
}

.search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1.1rem;
    pointer-events: none;
}

.search-input {
    background-color: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: 16px;
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 0.95rem;
    padding: 14px 16px 14px 46px;
    width: 100%;
    outline: none;
    transition: border-color 0.2s ease;
}

.search-input:focus {
    border-color: var(--accent);
}

.clear-search-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.2rem;
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
}

.clear-search-btn:hover {
    color: var(--text-main);
}

.filters-segmented-control {
    background-color: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: 16px;
    display: flex;
    padding: 4px;
    width: 100%;
}

@media (min-width: 768px) {
    .filters-segmented-control {
        width: auto;
        min-width: 300px;
    }
}

.filter-btn {
    background: none;
    border: none;
    border-radius: 12px;
    color: var(--text-muted);
    cursor: pointer;
    flex: 1;
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 700;
    padding: 10px;
    transition: all 0.2s ease;
}

.filter-btn.active {
    background-color: var(--bg-input);
    color: var(--text-main);
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

/* Slider and Navigation */
.navigation-panel {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.confederations-slider {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 8px;
    scrollbar-width: none; /* Firefox */
}

.confederations-slider::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

.conf-pill {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 99px;
    color: var(--text-muted);
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 0.82rem;
    font-weight: 700;
    padding: 10px 18px;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.conf-pill.active {
    background-color: var(--accent);
    color: #000;
    border-color: var(--accent);
    font-weight: 800;
}

.teams-grid-selector {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 8px;
    scrollbar-width: none;
}

.teams-grid-selector::-webkit-scrollbar {
    display: none;
}

.team-selector-pill {
    background-color: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text-main);
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 600;
    padding: 8px 14px;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.team-selector-pill.active {
    background-color: var(--bg-card);
    border-color: var(--accent);
    color: var(--accent);
}

/* Team Header Banner */
.team-header-banner {
    background: linear-gradient(135deg, var(--bg-card) 0%, rgba(21, 29, 48, 0.6) 100%);
    border: 2px solid var(--border);
    border-radius: 20px 20px 0 0;
    border-bottom: none;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.team-header-banner h2 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 800;
}

.team-progress-tag {
    font-family: var(--font-heading);
    background-color: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 800;
    padding: 4px 10px;
}

/* Stickers grid */
.stickers-cards-grid {
    background-color: rgba(21, 29, 48, 0.3);
    border: 2px solid var(--border);
    border-radius: 0 0 20px 20px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    padding: 12px;
    min-height: 200px;
}

@media (min-width: 480px) {
    .stickers-cards-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 768px) {
    .stickers-cards-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 12px;
        padding: 16px;
    }
}

@media (min-width: 1024px) {
    .stickers-cards-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

/* Sticker Cards */
.sticker-card {
    background-color: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), border-color 0.2s ease, box-shadow 0.2s ease;
}

.sticker-card:active {
    transform: scale(0.96);
}

.sticker-card-body {
    padding: 16px 12px;
    text-align: center;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    min-height: 100px;
}

.sticker-team-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    font-size: 0.65rem;
    font-weight: 800;
    color: var(--text-muted);
    text-transform: uppercase;
}

.sticker-type-label {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 0.62rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
}

.sticker-code-display {
    font-family: var(--font-heading);
    font-size: 1.45rem;
    font-weight: 800;
    color: var(--text-muted);
    letter-spacing: -0.02em;
    margin-top: 8px;
    transition: color 0.2s ease;
}

.sticker-card-footer {
    background-color: rgba(11, 15, 25, 0.4);
    border-top: 1px solid var(--border-soft);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px;
}

.adjust-btn {
    background-color: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-main);
    cursor: pointer;
    height: 32px;
    width: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.adjust-btn:active {
    transform: scale(0.85);
    background-color: var(--border);
}

.qty-display {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
}

.qty-display.active {
    color: var(--text-main);
}

/* Card States: Owned (cantidad >= 1) */
.sticker-card.owned {
    border-color: rgba(16, 185, 129, 0.4);
    background: linear-gradient(135deg, var(--bg-card) 0%, rgba(16, 185, 129, 0.05) 100%);
}

.sticker-card.owned .sticker-code-display {
    color: var(--primary);
    text-shadow: 0 0 10px rgba(16, 185, 129, 0.3);
}

.sticker-card.owned .sticker-team-badge,
.sticker-card.owned .sticker-type-label {
    color: rgba(16, 185, 129, 0.7);
}

/* Card States: Duplicates (cantidad > 1) */
.sticker-card.duplicate {
    border-color: rgba(139, 92, 246, 0.5);
    background: linear-gradient(135deg, var(--bg-card) 0%, rgba(139, 92, 246, 0.08) 100%);
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.08);
}

.sticker-card.duplicate::before {
    content: "Repetida";
    position: absolute;
    bottom: 48px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--secondary);
    color: #fff;
    font-size: 0.55rem;
    font-weight: 800;
    text-transform: uppercase;
    padding: 1px 6px;
    border-radius: 4px;
}

/* Syncing/Updating Loading State */
.sticker-card.syncing {
    opacity: 0.6;
    pointer-events: none;
}

/* Empty State / Message */
.empty-grid-msg {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-grid-msg i {
    font-size: 2.5rem;
    margin-bottom: 12px;
}

.empty-grid-msg p {
    font-size: 0.95rem;
    font-weight: 600;
}

/* App Ribbon banner */
.app-ribbon {
    position: absolute;
    top: 0;
    right: 0;
    background-color: var(--accent);
    color: #000;
    font-size: 0.55rem;
    font-weight: 800;
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: 0 14px 0 10px;
}

/* User Profile Header Utilities */
.desktop-only-user {
    display: flex;
}
.mobile-only-user {
    display: none;
}

@media (max-width: 980px) {
    .desktop-only-user {
        display: none !important;
    }
    .mobile-only-user {
        display: block !important;
        margin-top: 15px;
        padding-top: 15px;
        border-top: 1px solid var(--border-soft);
    }
    .mobile-only-user .user-greeting {
        display: block;
        margin-bottom: 10px;
    }
}
