/**
 * User System Styles
 * Login, Register, Dashboard
 */

/* Auth Wrapper */
.moviepro-auth-wrapper {
    max-width: 450px;
    margin: 50px auto;
    padding: 20px;
}

.auth-container {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    overflow: hidden;
}

.auth-form-wrapper {
    display: none;
    padding: 40px;
}

.auth-form-wrapper.active {
    display: block;
}

.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.auth-header h2 {
    font-size: 28px;
    margin-bottom: 10px;
    color: #333;
}

.auth-header p {
    color: #666;
    font-size: 14px;
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.form-group label i {
    margin-right: 5px;
    color: #e50914;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #e50914;
}

.checkbox-group {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.checkbox-group label {
    font-weight: normal;
    margin: 0;
}

.forgot-link {
    color: #e50914;
    text-decoration: none;
    font-size: 13px;
}

.forgot-link:hover {
    text-decoration: underline;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: #e50914;
    color: #fff;
}

.btn-primary:hover {
    background: #c40812;
}

.btn-secondary {
    background: #6c757d;
    color: #fff;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-block {
    width: 100%;
    justify-content: center;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Auth Switch */
.auth-switch {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
    color: #666;
}

.auth-switch a {
    color: #e50914;
    text-decoration: none;
    font-weight: 600;
}

.auth-switch a:hover {
    text-decoration: underline;
}

/* CAPTCHA */
.captcha-wrapper {
    margin: 20px 0;
    min-height: 78px;
}

/* Dashboard */
.moviepro-dashboard {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px;
}

/* Dashboard Header */
.dashboard-header {
    background: linear-gradient(135deg, #e50914 0%, #c40812 100%);
    color: #fff;
    padding: 40px;
    border-radius: 12px;
    margin-bottom: 30px;
}

.user-profile-section {
    display: flex;
    align-items: center;
    gap: 20px;
}

.user-avatar {
    flex-shrink: 0;
}

.user-avatar img {
    border-radius: 50%;
    border: 4px solid rgba(255,255,255,0.3);
}

.user-info {
    flex: 1;
}

.user-info h1 {
    margin: 0 0 5px 0;
    font-size: 32px;
}

.user-email {
    margin: 0 0 10px 0;
    opacity: 0.9;
}

.user-level-badge {
    display: inline-block;
    padding: 6px 12px;
    background: rgba(255,255,255,0.2);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}

.user-actions {
    flex-shrink: 0;
}

/* Dashboard Stats */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: #fff;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    display: flex;
    align-items: center;
    gap: 15px;
}

.stat-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #e50914 0%, #c40812 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 24px;
}

.stat-content h3 {
    margin: 0 0 5px 0;
    font-size: 28px;
    color: #333;
}

.stat-content p {
    margin: 0;
    color: #666;
    font-size: 14px;
}

/* Dashboard Tabs */
.dashboard-tabs {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    overflow: hidden;
}

.tab-nav {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    border-bottom: 2px solid #f0f0f0;
    background: #fafafa;
}

.tab-nav li {
    flex: 1;
}

.tab-nav a {
    display: block;
    padding: 15px 20px;
    text-align: center;
    text-decoration: none;
    color: #666;
    font-weight: 600;
    transition: all 0.3s;
}

.tab-nav li.active a {
    color: #e50914;
    background: #fff;
    border-bottom: 3px solid #e50914;
}

.tab-content {
    display: none;
    padding: 30px;
}

.tab-content.active {
    display: block;
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.dashboard-card {
    background: #f9f9f9;
    padding: 25px;
    border-radius: 8px;
}

.dashboard-card h3 {
    margin: 0 0 20px 0;
    font-size: 18px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
}

.dashboard-card h3 i {
    color: #e50914;
}

/* Activity List */
.activity-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.activity-item {
    display: flex;
    gap: 15px;
    padding: 15px;
    background: #fff;
    border-radius: 8px;
}

.activity-icon {
    width: 40px;
    height: 40px;
    background: #e509141a;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #e50914;
    flex-shrink: 0;
}

.activity-content {
    flex: 1;
}

.activity-content p {
    margin: 0 0 5px 0;
    font-size: 14px;
}

.activity-content a {
    color: #e50914;
    text-decoration: none;
    font-weight: 600;
}

.activity-date {
    font-size: 12px;
    color: #999;
}

/* Progress */
.progress-info {
    margin-bottom: 20px;
}

.progress-info p {
    margin: 10px 0;
    font-size: 14px;
    color: #666;
}

.level-progress {
    margin-top: 20px;
}

.progress-bar {
    height: 10px;
    background: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #e50914 0%, #ff6b6b 100%);
    transition: width 0.3s;
}

.progress-text {
    font-size: 13px;
    color: #666;
    text-align: center;
}

/* Movies Grid */
.movies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

/* Reviews List */
.reviews-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.review-item {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.review-header h4 {
    margin: 0;
    font-size: 18px;
}

.review-header h4 a {
    color: #333;
    text-decoration: none;
}

.review-header h4 a:hover {
    color: #e50914;
}

.review-rating {
    font-size: 16px;
}

.review-content {
    margin-bottom: 15px;
    color: #666;
    line-height: 1.6;
}

.review-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: #999;
}

.review-meta a {
    color: #e50914;
    text-decoration: none;
}

/* Settings Form */
.settings-form {
    max-width: 600px;
}

.settings-form h3 {
    margin: 30px 0 20px 0;
    font-size: 20px;
    color: #333;
}

.settings-form h3:first-child {
    margin-top: 0;
}

/* No Data */
.no-data {
    text-align: center;
    padding: 40px;
    color: #999;
    font-size: 16px;
}

/* Alerts */
.alert {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.alert-success {
    background: #28a745;
    color: #fff;
}

.alert-error {
    background: #dc3545;
    color: #fff;
}

/* Responsive */
@media (max-width: 768px) {
    .user-profile-section {
        flex-direction: column;
        text-align: center;
    }
    
    .tab-nav {
        flex-wrap: wrap;
    }
    
    .tab-nav li {
        flex: 1 1 50%;
    }
    
    .dashboard-stats {
        grid-template-columns: 1fr;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}


/* ========================================
   Header User Menu Styles
   ======================================== */

.header-user {
    position: relative;
    margin-left: 15px;
}

.btn-login {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    background: linear-gradient(135deg, #e94560 0%, #d63651 100%);
    color: #fff;
    border-radius: 25px;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(233, 69, 96, 0.4);
    color: #fff;
}

.user-menu-wrapper {
    position: relative;
}

.user-menu-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px 15px 5px 5px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 25px;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
}

.user-menu-toggle:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.user-menu-toggle img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.user-menu-toggle .user-name {
    font-size: 14px;
    font-weight: 500;
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-menu-toggle i {
    font-size: 12px;
    transition: transform 0.3s ease;
}

.user-menu-wrapper:hover .user-menu-toggle i {
    transform: rotate(180deg);
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 200px;
    background: #1a1a2e;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    overflow: hidden;
}

.user-menu-wrapper:hover .user-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-dropdown a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: #eaeaea;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
}

.user-dropdown a:hover {
    background: rgba(233, 69, 96, 0.1);
    color: #e94560;
    padding-left: 25px;
}

.user-dropdown a i {
    width: 18px;
    text-align: center;
    font-size: 14px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .header-user {
        margin-left: 10px;
    }
    
    .btn-login span {
        display: none;
    }
    
    .btn-login {
        padding: 8px 12px;
        border-radius: 50%;
        width: 40px;
        height: 40px;
        justify-content: center;
    }
    
    .user-menu-toggle .user-name {
        display: none;
    }
    
    .user-menu-toggle {
        padding: 5px;
        border-radius: 50%;
    }
    
    .user-dropdown {
        right: -50px;
    }
}

@media (max-width: 480px) {
    .user-dropdown {
        position: fixed;
        top: 70px;
        right: 10px;
        left: 10px;
        width: auto;
    }
}
