.app-header {
    height: 64px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    z-index: 10;
}

.app-title {
    font-size: 20px;
    font-weight: 800;
    color: var(--color-primary);
    letter-spacing: -0.5px;
    user-select: none;
}

.desktop-nav-menu {
    display: none;
    gap: 20px;
    margin-left: 10px;
}

.desktop-nav-menu a {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-secondary);
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.desktop-nav-menu a:hover {
    color: var(--color-primary);
}

.desktop-signout-btn {
    display: none;
}

@media (min-width: 769px) {
    .desktop-nav-menu {
        display: flex;
    }
    .desktop-signout-btn {
        display: inline-flex;
    }
}

.main-content {
    flex: 1;
    overflow-y: auto;
    padding: 24px 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.page-view {
    display: none;
    flex-direction: column;
    gap: 16px;
    width: 100%;
}

.page-view.active {
    display: flex;
}

#page-login, #page-register {
    max-width: 420px;
    margin: 40px auto;
    width: 100%;
}

/* Bottom Nav */
#bottom-nav {
    height: 68px;
    background: var(--bg-card);
    border-top: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding-bottom: env(safe-area-inset-bottom);
    z-index: 10;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: var(--text-muted);
    font-weight: 700;
    font-size: 11px;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.nav-item.active {
    color: var(--color-primary);
}

.nav-icon {
    font-size: 20px;
}

@media (min-width: 769px) {
    #bottom-nav {
        display: none !important;
    }
}

/* Quick Actions */
.actions-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    width: 100%;
}

.action-tile {
    background: var(--bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 16px 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-smooth);
}

.action-tile:hover {
    border-color: var(--color-primary);
    transform: translateY(-2px);
}

.action-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    background: var(--color-primary-light);
    color: var(--color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.action-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-primary);
}

/* Carousel */
.banner-carousel {
    position: relative;
    width: 100%;
    height: 160px;
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.banners-container {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    height: 100%;
    width: 100%;
}

.banners-container::-webkit-scrollbar {
    display: none;
}

.banner-slide {
    flex: 0 0 100%;
    scroll-snap-align: start;
    height: 100%;
    background-size: cover;
    background-position: center;
    position: relative;
    cursor: pointer;
}

.banner-overlay {
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(0,0,0,0) 20%, rgba(0,0,0,0.6) 100%);
    display: flex;
    align-items: flex-end;
    padding: 16px;
}

.banner-title {
    color: white;
    font-size: 14px;
    font-weight: 700;
}

.banner-dots {
    position: absolute;
    bottom: 12px;
    right: 16px;
    display: flex;
    gap: 6px;
}

.dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255,255,255,0.4);
}

.dot.active {
    background: white;
    width: 14px;
    border-radius: var(--radius-full);
}

/* Video Cards Grids */
#ads-list-container {
    display: grid !important;
    grid-template-columns: 1fr;
    gap: 16px;
    width: 100%;
}

@media (min-width: 769px) {
    #ads-list-container {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (min-width: 1024px) {
    #ads-list-container {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

.video-card {
    background: var(--bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    padding: 14px;
    gap: 14px;
}

.video-thumb {
    width: 72px;
    height: 72px;
    border-radius: var(--radius-md);
    background-size: cover;
    background-position: center;
    background-color: var(--bg-accent);
}

.video-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.video-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
}

.video-meta {
    font-size: 11px;
    color: var(--text-secondary);
    display: flex;
    gap: 6px;
}

.video-reward {
    font-size: 15px;
    font-weight: 800;
    color: var(--color-success);
}

/* Packages Grid layout */
#packages-list-container {
    display: grid !important;
    grid-template-columns: 1fr;
    gap: 20px;
    width: 100%;
}

@media (min-width: 769px) {
    #packages-list-container {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (min-width: 1024px) {
    #packages-list-container {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

/* History Logs */
.history-item {
    background: var(--bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    box-shadow: var(--shadow-sm);
}

.history-left {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.history-title {
    font-size: 13px;
    font-weight: 700;
}

.history-date {
    font-size: 11px;
    color: var(--text-muted);
}

.history-amount {
    font-size: 14px;
    font-weight: 800;
}

/* Ad player overlay views */
.active-ad-player {
    background: var(--bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    box-shadow: var(--shadow-lg);
    max-width: 600px;
    margin: 0 auto;
    width: 100%;
}

.mock-video-container {
    width: 100%;
    height: 280px;
    border-radius: var(--radius-lg);
    background-size: cover;
    background-position: center;
    position: relative;
}

.timer-overlay {
    position: absolute;
    top: 14px;
    right: 14px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    padding: 4px 10px;
    gap: 6px;
    font-size: 12px;
    font-weight: 800;
    box-shadow: var(--shadow-sm);
    color: var(--text-primary);
}

.timer-svg {
    transform: rotate(-90deg);
}

.timer-circle-bg {
    fill: none;
    stroke: var(--color-border);
    stroke-width: 3.5;
}

.timer-circle-val {
    fill: none;
    stroke: var(--color-primary);
    stroke-width: 3.5;
    stroke-linecap: round;
    transition: stroke-dashoffset 1s linear;
}

/* Notification Drawer */
.bell-container {
    position: relative;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background: var(--bg-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--text-secondary);
}

.bell-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--color-danger);
    color: white;
    font-size: 10px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--bg-card);
}

.notif-drawer {
    position: absolute;
    top: 0;
    right: 0;
    width: 85%;
    max-width: 360px;
    height: 100%;
    background: var(--bg-card);
    box-shadow: var(--shadow-xl);
    padding: 24px;
    display: flex;
    flex-direction: column;
    animation: slideLeft 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideLeft {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

.notif-drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1.5px solid var(--color-border);
    padding-bottom: 12px;
}

.notif-item {
    padding: 12px;
    border-radius: var(--radius-md);
    background: var(--bg-accent);
    margin-bottom: 10px;
    font-size: 12px;
    border-left: 3px solid var(--color-primary);
    transition: var(--transition-smooth);
}

.notif-item.read {
    border-left-color: var(--text-muted);
    opacity: 0.8;
}

.notif-item-title { font-weight: 700; color: var(--text-primary); }
.notif-item-desc { color: var(--text-secondary); margin: 4px 0; }
.notif-item-date { font-size: 10px; color: var(--text-muted); }

/* Progress bar indicators */
.progress-bar-wrapper {
    background: var(--bg-accent);
    border-radius: var(--radius-full);
    height: 8px;
    width: 100%;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: var(--color-primary);
    border-radius: var(--radius-full);
    transition: width 0.4s ease;
}

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

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

.stat-item-box {
    background: var(--bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat-item-lbl {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.stat-item-val {
    font-size: 18px;
    font-weight: 800;
    color: var(--text-primary);
}
