/* assets/css/style.css */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #fff;
}

.app-container {
    max-width: 414px;
    margin: 0 auto;
    background: rgba(0, 0, 0, 0.9);
    min-height: 100vh;
    position: relative;
}

/* Header */
.header {
    background: rgba(0, 0, 0, 0.95);
    padding: 15px 20px;
    position: fixed;
    top: 0;
    width: 100%;
    max-width: 414px;
    z-index: 100;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.vip-badge {
    background: linear-gradient(45deg, #ff6b6b, #ffa500);
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: bold;
}

/* Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    width: 100%;
    max-width: 414px;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    padding: 10px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 100;
}

.nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.nav-item.active {
    color: #667eea;
}

.nav-icon {
    font-size: 1.2rem;
    margin-bottom: 4px;
}

.nav-label {
    font-size: 0.7rem;
}

/* Main Content */
.main-content {
    padding: 80px 20px 100px;
    min-height: calc(100vh - 180px);
}

.page {
    display: none;
}

.page.active {
    display: block;
}

.section {
    margin-bottom: 30px;
}

.section-title {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: #fff;
}

/* Horizontal Scroll */
.horizontal-scroll {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    padding-bottom: 10px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.horizontal-scroll::-webkit-scrollbar {
    display: none;
}

.series-card {
    min-width: 140px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.series-card:hover {
    transform: scale(1.05);
}

.series-poster {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.series-info {
    padding: 12px;
}

.series-title {
    font-size: 0.9rem;
    font-weight: bold;
    margin-bottom: 5px;
    line-height: 1.3;
}

.series-meta {
    font-size: 0.75rem;
    opacity: 0.7;
}

/* Grid Layout */
.series-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.series-grid .series-card {
    min-width: auto;
}

/* Load More Button */
.load-more-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(45deg, #667eea, #764ba2);
    border: none;
    border-radius: 8px;
    color: white;
    font-weight: bold;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.load-more-btn:hover {
    opacity: 0.8;
}

/* Continue Watching Card */
.continue-card {
    min-width: 180px;
    position: relative;
}

.progress-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 4px;
    background: #667eea;
    transition: width 0.3s ease;
}

/* Schedule List */
.schedule-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.schedule-day {
    margin-bottom: 20px;
}

.day-title {
    color: #667eea;
    font-size: 1.1rem;
    margin-bottom: 10px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(102, 126, 234, 0.3);
}

.schedule-item {
    background: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 10px;
}

.schedule-time {
    min-width: 60px;
    text-align: center;
}

.schedule-date {
    font-weight: bold;
    color: #667eea;
}

.schedule-hour {
    font-size: 0.8rem;
    opacity: 0.7;
}

/* Profile */
.profile-card {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 20px;
}

.profile-info {
    text-align: center;
    margin-bottom: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#profilePhoto {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 10px;
    background: #222;
    border: 2px solid #667eea;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    transition: box-shadow 0.3s, transform 0.3s, opacity 0.5s;
    opacity: 0;
}
#profilePhoto.show {
    opacity: 1;
    animation: fadeInProfile 0.7s;
}
#profilePhoto:hover {
    box-shadow: 0 4px 16px rgba(102,126,234,0.4);
    transform: scale(1.07);
}
@keyframes fadeInProfile {
    from { opacity: 0; transform: scale(0.8);}
    to { opacity: 1; transform: scale(1);}
}

.vip-section h3 {
    margin-bottom: 15px;
    color: #667eea;
}

.vip-benefits p {
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.vip-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(45deg, #ff6b6b, #ffa500);
    border: none;
    border-radius: 12px;
    color: white;
    font-weight: bold;
    font-size: 1rem;
    cursor: pointer;
    margin-top: 20px;
    transition: transform 0.3s ease;
}

.vip-btn:hover {
    transform: translateY(-2px);
}

/* Loading */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    display: none;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 480px) {
    .series-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .horizontal-scroll {
        gap: 10px;
    }
    
    .series-card {
        min-width: 120px;
    }
    
    .series-poster {
        height: 170px;
    }
}

.admin-panel {
    background: rgba(255,255,255,0.05);
    border-radius: 15px;
    padding: 24px;
    margin-top: 30px;
    color: #fff;
}

.admin-panel h2 {
    color: #ff6b6b;
    margin-bottom: 18px;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 24px;
}

.admin-table th, .admin-table td {
    border: 1px solid rgba(255,255,255,0.1);
    padding: 10px;
    text-align: left;
}

.admin-table th {
    background: #667eea;
    color: #fff;
}

.admin-table tr:nth-child(even) {
    background: rgba(255,255,255,0.03);
}

/* Custom Popup Alert */
.custom-alert-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.45);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeInAlert 0.2s;
}
.custom-alert-box {
    background: #fff;
    color: #222;
    border-radius: 18px;
    padding: 28px 20px 18px 20px;
    min-width: 270px;
    max-width: 90vw;
    box-shadow: 0 8px 32px rgba(0,0,0,0.18);
    text-align: center;
    animation: popInAlert 0.25s;
}
.custom-alert-message {
    font-size: 1.08rem;
    margin-bottom: 22px;
    line-height: 1.5;
}
.custom-alert-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
}
.custom-alert-actions button {
    flex: 1;
    padding: 10px 0;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: #fff;
    transition: background 0.2s, transform 0.2s;
}
.custom-alert-actions button#customAlertCancel {
    background: #eee;
    color: #667eea;
}
.custom-alert-actions button:active {
    transform: scale(0.97);
}
@keyframes fadeInAlert {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes popInAlert {
    from { transform: scale(0.85); }
    to { transform: scale(1); }
}
