/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: #f5f7fa;
    color: #2d3748;
    line-height: 1.6;
}

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

/* Page Management */
.page {
    display: none;
}

.page.active {
    display: block;
}

/* Navbar */
.navbar {
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar.navbar-dark {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 700;
    color: #667eea;
}

.navbar-dark .nav-brand {
    color: white;
}

.nav-brand i {
    font-size: 1.8rem;
}

.nav-links {
    display: flex;
    gap: 15px;
    align-items: center;
}

.nav-menu {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.nav-item {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-item:hover,
.nav-item.active {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
}

.btn-outline {
    background: transparent;
    border: 2px solid #667eea;
    color: #667eea;
}

.btn-outline:hover {
    background: #667eea;
    color: white;
}

.btn-large {
    padding: 16px 40px;
    font-size: 1.1rem;
}

.btn-block {
    width: 100%;
    justify-content: center;
}

.btn-text {
    background: transparent;
    color: #667eea;
    padding: 8px 16px;
}

.btn-success {
    background: #48bb78;
    color: white;
}

.btn-danger {
    background: #f56565;
    color: white;
}

.btn-warning {
    background: #ed8936;
    color: white;
}

/* Hero Section */
.hero {
    padding: 80px 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    font-weight: 700;
}

.hero p {
    font-size: 1.3rem;
    margin-bottom: 40px;
    opacity: 0.9;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin: 40px 0;
    flex-wrap: wrap;
}

.hero-stats .stat {
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(255, 255, 255, 0.1);
    padding: 20px 30px;
    border-radius: 12px;
}

.hero-stats .stat i {
    font-size: 2.5rem;
}

.hero-stats .stat strong {
    display: block;
    font-size: 2rem;
    font-weight: 700;
}

.hero-stats .stat span {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Features Section */
.features {
    padding: 80px 0;
    background: white;
}

.features h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 50px;
    color: #2d3748;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.feature-card {
    text-align: center;
    padding: 40px 20px;
    background: #f7fafc;
    border-radius: 12px;
    transition: all 0.3s;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.feature-card i {
    font-size: 3rem;
    color: #667eea;
    margin-bottom: 20px;
}

.feature-card h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: #2d3748;
}

.feature-card p {
    color: #718096;
}

/* Auth Pages */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 40px 20px;
}

.auth-container {
    background: white;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 450px;
    width: 100%;
}

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

.auth-header h2 {
    font-size: 2rem;
    color: #2d3748;
    margin-bottom: 10px;
}

.auth-header p {
    color: #718096;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2d3748;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: #718096;
    font-size: 0.85rem;
}

.form-footer {
    text-align: right;
    margin-bottom: 20px;
}

.form-footer a {
    color: #667eea;
    text-decoration: none;
    font-size: 0.9rem;
}

.auth-switch {
    text-align: center;
    margin-top: 20px;
    color: #718096;
}

.auth-switch a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
}

/* Dashboard */
.dashboard-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    flex-wrap: wrap;
    gap: 20px;
}

.dashboard-header h1 {
    font-size: 2rem;
    color: #2d3748;
}

.user-level-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px 24px;
    border-radius: 50px;
    font-weight: 600;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: all 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.8rem;
}

.stat-info {
    flex: 1;
}

.stat-label {
    display: block;
    color: #718096;
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.stat-value {
    display: block;
    font-size: 1.8rem;
    font-weight: 700;
    color: #2d3748;
}

.quick-actions {
    display: flex;
    gap: 20px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.action-btn {
    flex: 1;
    min-width: 200px;
    background: white;
    border: 2px solid #e2e8f0;
    padding: 20px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.action-btn:hover {
    border-color: #667eea;
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.action-btn i {
    font-size: 2.5rem;
    color: #667eea;
}

.action-btn span {
    font-weight: 600;
    color: #2d3748;
}

.recent-activity {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.recent-activity h3 {
    margin-bottom: 20px;
    color: #2d3748;
}

/* Videos Section */
.videos-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.videos-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.videos-header h2 {
    color: #2d3748;
}

.daily-limit {
    background: white;
    padding: 12px 24px;
    border-radius: 50px;
    font-weight: 600;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.videos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
}

.video-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.3s;
    cursor: pointer;
}

.video-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.video-thumbnail {
    width: 100%;
    height: 180px;
    object-fit: cover;
    background: #e2e8f0;
}

.video-details {
    padding: 20px;
}

.video-details h3 {
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: #2d3748;
}

.video-details p {
    color: #718096;
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.video-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.video-earning {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #48bb78;
    font-weight: 600;
}

.video-level-required {
    background: #edf2f7;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    color: #2d3748;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 16px;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-large {
    max-width: 900px;
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    color: #2d3748;
}

.close-btn {
    background: transparent;
    border: none;
    font-size: 1.5rem;
    color: #718096;
    cursor: pointer;
    transition: all 0.3s;
}

.close-btn:hover {
    color: #2d3748;
}

.modal-body {
    padding: 20px;
}

#youtubePlayer {
    width: 100%;
    height: 500px;
    background: #000;
    border-radius: 8px;
    margin-bottom: 20px;
}

.video-info {
    background: #f7fafc;
    padding: 20px;
    border-radius: 8px;
}

.watch-progress {
    margin-top: 15px;
}

.progress-bar {
    width: 100%;
    height: 10px;
    background: #e2e8f0;
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    width: 0%;
    transition: width 0.3s;
}

/* Withdraw Section */
.withdraw-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

@media (max-width: 768px) {
    .withdraw-container {
        grid-template-columns: 1fr;
    }
}

.withdraw-form-section,
.withdraw-history {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.withdraw-form-section h2,
.withdraw-history h3 {
    margin-bottom: 20px;
    color: #2d3748;
}

.balance-display {
    text-align: center;
    padding: 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px;
    margin-bottom: 30px;
}

.balance-display span {
    display: block;
    font-size: 0.9rem;
    opacity: 0.9;
    margin-bottom: 10px;
}

.balance-display strong {
    font-size: 2.5rem;
    font-weight: 700;
}

.withdrawal-item {
    border: 1px solid #e2e8f0;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 15px;
}

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

.withdrawal-amount {
    font-size: 1.3rem;
    font-weight: 700;
    color: #2d3748;
}

.status-badge {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.status-badge.pending {
    background: #fef5e7;
    color: #ed8936;
}

.status-badge.approved {
    background: #e6f4ea;
    color: #48bb78;
}

.status-badge.rejected {
    background: #fee;
    color: #f56565;
}

.withdrawal-details {
    color: #718096;
    font-size: 0.9rem;
}

.withdrawal-details p {
    margin: 5px 0;
}

/* Upgrade Section */
.upgrade-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.upgrade-container h2 {
    margin-bottom: 30px;
    color: #2d3748;
}

.levels-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.level-card {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.level-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.level-card.current {
    border: 2px solid #667eea;
}

.level-card.locked {
    opacity: 0.6;
}

.current-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #48bb78;
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.level-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.level-card h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: #2d3748;
}

.level-price {
    font-size: 2rem;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 20px;
}

.level-benefits {
    margin-bottom: 20px;
}

.level-benefits p {
    color: #718096;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.level-benefits i {
    color: #48bb78;
}

.payment-info {
    background: #f7fafc;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.payment-info h4 {
    margin-bottom: 15px;
    color: #2d3748;
}

.payment-details-box {
    background: white;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #667eea;
    margin-top: 10px;
}

.payment-details-box p {
    margin: 8px 0;
    color: #2d3748;
}

.upgrade-history {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-top: 40px;
}

.upgrade-history h3 {
    margin-bottom: 20px;
    color: #2d3748;
}

.upgrade-item {
    border: 1px solid #e2e8f0;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 15px;
}

/* Admin Panel */
.admin-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.admin-header h2 {
    color: #2d3748;
}

.data-table {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.data-table table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    background: #f7fafc;
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: #2d3748;
    border-bottom: 2px solid #e2e8f0;
}

.data-table td {
    padding: 15px;
    border-bottom: 1px solid #e2e8f0;
    color: #2d3748;
}

.data-table tr:hover {
    background: #f7fafc;
}

.action-buttons {
    display: flex;
    gap: 8px;
}

.action-buttons button {
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.3s;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #718096;
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.5;
}

/* Loading Overlay */
.loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    z-index: 3000;
    align-items: center;
    justify-content: center;
}

.loading-overlay.active {
    display: flex;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #e2e8f0;
    border-top-color: #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 4000;
}

.toast {
    background: white;
    padding: 16px 24px;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 300px;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.toast.success {
    border-left: 4px solid #48bb78;
}

.toast.error {
    border-left: 4px solid #f56565;
}

.toast.info {
    border-left: 4px solid #667eea;
}

.toast i {
    font-size: 1.5rem;
}

.toast.success i {
    color: #48bb78;
}

.toast.error i {
    color: #f56565;
}

.toast.info i {
    color: #667eea;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .hero-stats {
        flex-direction: column;
        gap: 15px;
    }

    .nav-menu {
        width: 100%;
    }

    .nav-item {
        flex: 1;
        min-width: 0;
        font-size: 0.8rem;
        padding: 8px 12px;
    }

    .nav-item span {
        display: none;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .quick-actions {
        flex-direction: column;
    }

    .action-btn {
        min-width: 100%;
    }

    .data-table {
        overflow-x: auto;
    }

    #youtubePlayer {
        height: 300px;
    }
}
