/* style.css - Original UI Design */
:root {
    --bg-dark: #0f0f0f;
    --surface: #1e1e1e;
    --primary: #E50914;
    --accent: #4DD0E1;
    --gold: #FFD700;
    --text-main: #ffffff;
    --text-sec: #aaaaaa;
    --nav-bg: #000000;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: 'Montserrat', sans-serif;
    padding-bottom: 90px;
    margin: 0;
    overflow-x: hidden;
    min-height: 100vh;
    -webkit-user-select: none;
    user-select: none;
}

/* Header Styles */
#main-header {
    padding: 20px 15px;
    background: linear-gradient(180deg, #000000 0%, rgba(15,15,15,0.9) 80%, rgba(15,15,15,0) 100%);
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand {
    font-family: 'Orbitron', sans-serif;
    font-weight: 900;
    font-size: 28px;
    letter-spacing: 3px;
}

.brand span {
    color: var(--primary);
}

.header-balance {
    background: #252525;
    padding: 8px 15px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
}

/* Page Tabs */
.page-tabs {
    display: flex;
    background: #000;
    border-bottom: 1px solid #222;
}

.page-tab {
    flex: 1;
    text-align: center;
    padding: 15px 0;
    color: #666;
    font-size: 12px;
    cursor: pointer;
    transition: 0.3s;
}

.page-tab.active {
    color: var(--primary);
    border-bottom: 2px solid var(--primary);
}

.page-tab i {
    display: block;
    font-size: 20px;
    margin-bottom: 5px;
}

/* Page Content */
.page-content {
    display: none;
    padding: 15px;
    animation: fadeIn 0.3s ease;
}

.page-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Category Scroll */
.category-scroll {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 10px 0;
    margin-bottom: 20px;
    scrollbar-width: none;
}

.category-scroll::-webkit-scrollbar {
    display: none;
}

.cat-pill {
    background: #2a2a2a;
    color: #fff;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    border: 1px solid #333;
    transition: 0.3s;
    flex-shrink: 0;
}

.cat-pill.active {
    background: var(--text-main);
    color: #000;
    font-weight: 800;
    border-color: white;
}

/* Video Feed */
.video-feed {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.video-card {
    background: var(--surface);
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 8px 20px rgba(0,0,0,0.4);
    border: 1px solid #2a2a2a;
}

.thumb-container {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    background: #000;
}

.thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.9;
}

.duration-badge {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0,0,0,0.85);
    color: white;
    font-size: 10px;
    padding: 3px 6px;
    border-radius: 4px;
    font-weight: 700;
}

.cat-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    color: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.5);
    letter-spacing: 0.5px;
}

.bg-Series { background: var(--primary); }
.bg-Movies { background: #9C27B0; }
.bg-Cartoon { background: #FF9800; }
.bg-Drama { background: #009688; }
.bg-Default { background: #607D8B; }

.lock-overlay, .play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 2;
}

.lock-overlay {
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    gap: 10px;
}

.play-overlay {
    background: rgba(0,0,0,0.2);
    opacity: 0;
    transition: opacity 0.2s;
    cursor: pointer;
}

.video-card.unlocked .play-overlay {
    opacity: 1;
}

.ads-badge {
    background: var(--primary);
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 800;
    cursor: pointer;
}

.token-lock-badge {
    background: var(--gold);
    color: black;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 800;
    cursor: pointer;
    border: 1px solid #fff;
}

.video-info {
    padding: 15px;
}

.video-title {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1.4;
    color: #eee;
}

.action-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #333;
    padding-top: 10px;
}

.meta-left {
    font-size: 11px;
    color: var(--text-sec);
    font-weight: 500;
}

.like-btn {
    font-size: 13px;
    color: var(--text-sec);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
}

.like-btn.liked {
    color: var(--primary);
}

/* Earning Styles */
.earning-tabs {
    display: flex;
    background: #1a1a1a;
    margin: 15px 0 20px;
    border-radius: 12px;
    padding: 5px;
    border: 1px solid #333;
}

.earning-tab {
    flex: 1;
    text-align: center;
    padding: 12px 0;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 12px;
    color: #888;
    transition: 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.earning-tab i {
    font-size: 16px;
}

.earning-tab.active {
    background: #252525;
    color: var(--accent);
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.earning-tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.earning-tab-content.active {
    display: block;
}

.earning-card {
    background: linear-gradient(135deg, #1e1e1e 0%, #111 100%);
    padding: 25px;
    border-radius: 20px;
    border: 1px solid #333;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    margin-bottom: 20px;
}

.balance-display {
    font-family: 'Orbitron';
    font-size: 36px;
    font-weight: 900;
    color: var(--gold);
    margin: 10px 0;
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.3);
}

.task-progress {
    background: #333;
    height: 10px;
    border-radius: 5px;
    margin: 20px 0;
    overflow: hidden;
    position: relative;
}

.progress-bar {
    height: 100%;
    background: var(--primary);
    width: 0%;
    transition: width 0.5s ease;
}

.earn-btn {
    background: var(--primary);
    color: white;
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(229, 9, 20, 0.4);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.earn-btn:disabled {
    background: #444;
    color: #888;
    cursor: not-allowed;
    box-shadow: none;
}

.timer-badge {
    background: #222;
    color: var(--accent);
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 12px;
    display: inline-block;
    margin-top: 10px;
}

/* Profile Styles */
.profile-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    padding: 20px;
    background: #161616;
    border-radius: 16px;
    border: 1px solid #333;
}

.profile-img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 2px solid var(--accent);
}

.profile-info {
    flex: 1;
}

.profile-name {
    font-weight: 700;
    font-size: 18px;
}

.profile-id {
    font-size: 12px;
    color: #aaa;
}

.profile-status {
    font-size: 10px;
    color: #FFD700;
    margin-top: 5px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.stat-card {
    background: #1e1e1e;
    padding: 15px;
    text-align: center;
    border-radius: 12px;
    border: 1px solid #333;
}

.stat-value {
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 5px;
}

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

.profile-menu {
    background: #1e1e1e;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 20px;
}

.menu-item {
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    border-bottom: 1px solid #2a2a2a;
    transition: 0.2s;
}

.menu-item:last-child {
    border-bottom: none;
}

.menu-item:hover {
    background: #252525;
}

.menu-item i:first-child {
    width: 30px;
    color: #aaa;
}

.action-btn {
    background: var(--accent);
    color: #000;
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 10px;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.version-info {
    text-align: center;
    font-size: 10px;
    color: #666;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.95);
    backdrop-filter: blur(10px);
    z-index: 9000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: 0.4s;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.modal-box {
    background: #1e1e1e;
    width: 90%;
    max-width: 400px;
    border-radius: 20px;
    border: 1px solid var(--accent);
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0,0,0,0.7);
    transform: scale(0.9);
    transition: 0.3s;
    text-align: center;
}

.modal-overlay.active .modal-box {
    transform: scale(1);
}

.modal-header {
    background: linear-gradient(90deg, #4DD0E1 0%, #26C6DA 100%);
    padding: 20px;
}

.modal-header h3 {
    margin: 0;
    color: #000;
    font-family: 'Orbitron';
    font-size: 22px;
}

.modal-content {
    padding: 25px;
}

/* Toast */
#toast {
    position: fixed;
    bottom: 120px;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    padding: 10px 20px;
    border-radius: 20px;
    opacity: 0;
    transition: 0.3s;
    pointer-events: none;
    z-index: 3000;
    border: 1px solid var(--accent);
}

#toast.show {
    opacity: 1;
}

/* Loader */
.loader {
    width: 30px;
    height: 30px;
    border: 3px solid #333;
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 1s infinite;
    margin: 20px auto;
    display: none;
}

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

/* Responsive */
@media (max-width: 768px) {
    .brand {
        font-size: 24px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .earning-card {
        padding: 20px;
    }
    
    .balance-display {
        font-size: 28px;
    }
}

@media (max-width: 480px) {
    .brand {
        font-size: 20px;
    }
    
    .page-tab {
        font-size: 10px;
    }
    
    .page-tab i {
        font-size: 18px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
}