:root {
    --bg-color: #0f172a;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    
    --glass-bg: rgba(30, 41, 59, 0.6);
    --glass-border: rgba(255, 255, 255, 0.08);
    
    --primary: #e11d48;
    --primary-hover: #be123c;
    
    --success: #10b981;
    --danger: #ef4444;
    --warn: #f59e0b;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Outfit', sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    background-image: 
        radial-gradient(circle at 15% 50%, rgba(225, 29, 72, 0.08) 0px, transparent 50%),
        radial-gradient(circle at 85% 30%, rgba(56, 189, 248, 0.08) 0px, transparent 50%);
    background-attachment: fixed;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Glassmorphism Classes */
.glass-header {
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.header-left h1 {
    font-size: 1.3rem;
    font-weight: 700;
    background: linear-gradient(to right, #fff, #cbd5e1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo-icon {
    font-size: 1.6rem;
    color: var(--primary);
}

.net-pill {
    font-size: 0.7rem;
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: 700;
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.3);
}
.net-pill.offline {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.container {
    padding: 20px;
    max-width: 800px;
    margin: 0 auto;
}

/* Filter Section */
.filter-section {
    padding: 16px;
    margin-bottom: 24px;
}

.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.filter-header h2 {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-muted);
}

.filter-controls {
    display: flex;
    gap: 12px;
}

.modern-select {
    flex: 1;
    background: rgba(0,0,0,0.3);
    border: 1px solid var(--glass-border);
    color: white;
    padding: 14px 16px;
    border-radius: 14px;
    outline: none;
    font-size: 1rem;
    font-weight: 500;
    appearance: none;
    transition: border-color 0.3s;
}
.modern-select:focus {
    border-color: var(--primary);
}
.modern-select option {
    background: var(--bg-color);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-hover));
    color: white;
    border: none;
    padding: 0 24px;
    border-radius: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(225, 29, 72, 0.3);
}

.btn-primary:active {
    transform: scale(0.96);
    box-shadow: 0 2px 8px rgba(225, 29, 72, 0.2);
}

.btn-icon {
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--glass-border);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s, transform 0.2s;
}
.btn-icon:active {
    transform: scale(0.9);
    background: rgba(255,255,255,0.1);
}

/* Dashboard Grid */
.dashboard-grid {
    display: flex;
    flex-direction: column;
    gap: 24px;
    animation: fadeIn 0.4s ease-out forwards;
}

.stat-card {
    padding: 24px;
    position: relative;
    overflow: hidden;
}

.stat-card h3 {
    font-size: 0.95rem;
    color: rgba(255,255,255,0.8);
    font-weight: 500;
}

.stat-value {
    font-size: 3rem;
    font-weight: 900;
    margin: 5px 0;
    background: linear-gradient(to right, #fff, #f1f5f9);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat-label {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--primary);
}

.stat-icon-large {
    font-size: 4rem;
    color: rgba(225, 29, 72, 0.15);
}

.gradient-1 {
    background: linear-gradient(135deg, rgba(225,29,72,0.15), rgba(0,0,0,0));
    border-left: 4px solid var(--primary);
}

/* Lists */
.section-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.arr-btn {
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--glass-border);
    color: #fff;
    font-size: 0.9rem;
    cursor: pointer;
    padding: 6px 14px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    transition: all 0.2s;
}
.arr-btn:active {
    transform: scale(0.95);
    background: var(--primary);
    border-color: var(--primary);
}

.horizontal-scroll {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding-bottom: 12px;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
}
.horizontal-scroll::-webkit-scrollbar {
    height: 4px;
}
.horizontal-scroll::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
}

.hit-card {
    min-width: 220px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 16px;
    scroll-snap-align: start;
    position: relative;
}

.hit-score {
    position: absolute;
    top: -12px;
    right: -12px;
    background: linear-gradient(135deg, #f59e0b, #ea580c);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 0.9rem;
    box-shadow: 0 6px 15px rgba(245, 158, 11, 0.4);
    z-index: 10;
}

.hit-img-ph {
    width: 100%;
    height: 140px;
    background: rgba(0,0,0,0.3);
    border-radius: 14px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: rgba(255,255,255,0.1);
    background-size: cover;
    background-position: center;
}

.hit-card h4 {
    font-size: 1.1rem;
    margin-bottom: 6px;
    font-weight: 700;
}

.hit-card p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.vertical-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.flop-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(0,0,0,0.2);
    border: 1px solid var(--glass-border);
    padding: 16px;
    border-radius: 16px;
}

.flop-info h4 {
    font-size: 1rem;
    font-weight: 700;
}
.flop-info p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.flop-days {
    background: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 700;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Gallery Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
    padding-bottom: 40px;
}

.gallery-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
}
.gallery-card:active {
    transform: scale(0.98);
}
.gallery-img {
    height: 200px;
    background-size: cover;
    background-position: center;
    background-color: rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: rgba(255,255,255,0.1);
}
.gallery-info {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}
.gallery-info h3 {
    font-size: 1rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.gallery-action {
    margin-top: auto;
    padding-top: 8px;
    border-top: 1px solid rgba(255,255,255,0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.gallery-arr {
    background: var(--primary);
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
}

/* Details Page */
.details-page {
    animation: slideIn 0.3s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}
@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.details-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.details-header h2 {
    font-size: 1.4rem;
    font-weight: 700;
}

.det-hero {
    margin-bottom: 24px;
    padding: 8px;
}

.det-image-container {
    width: 100%;
    height: 350px;
    background-size: cover;
    background-position: center;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: rgba(255,255,255,0.05);
    background-color: rgba(0,0,0,0.2);
    box-shadow: inset 0 0 50px rgba(0,0,0,0.5);
}

.det-stats {
    padding: 24px;
}

/* Skeleton Loader */
.loader-container {
    padding: 40px 20px;
}
.skeleton {
    background: linear-gradient(90deg, rgba(255,255,255,0.03) 25%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0.03) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 12px;
}
.skel-card { height: 120px; margin-bottom: 20px; }
.skel-title { height: 24px; width: 40%; margin-bottom: 16px; }
.skel-row { height: 160px; display: flex; gap: 16px; margin-bottom: 30px; }
.skel-box { min-width: 200px; height: 100%; }

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Toast */
.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    color: #fff;
    padding: 12px 24px;
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 600;
    display: none;
    z-index: 1000;
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
    animation: fadeIn 0.3s ease-out;
}
.success-toast { border-color: var(--success); color: var(--success); }
.error-toast { border-color: var(--danger); color: var(--danger); }