/* Profile Page Styles */

.profile-container {
    max-width: 1200px;
    margin: 0 auto;
    padding-bottom: 40px;
}

.profile-header {
    position: relative;
    height: 200px;
    background-image: linear-gradient(to right, #2d3748, #1e40af);
    border-radius: 8px;
    margin-bottom: 80px;
    overflow: hidden;
}

.gradient-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.2), rgba(0,0,0,0.7));
    z-index: 1;
}

.profile-header-content {
    position: relative;
    z-index: 2;
    padding: 30px;
    color: white;
}

.profile-header h1 {
    font-size: 32px;
    margin-bottom: 8px;
}

.profile-content {
    background-color: #1f2937;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.profile-section {
    display: flex;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #374151;
}

.profile-avatar {
    position: relative;
    width: 120px;
    height: 120px;
    margin-right: 20px;
    margin-top: -60px;
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 4px solid #1f2937;
    object-fit: cover;
    background-color: #4b5563;
}

.edit-avatar {
    position: absolute;
    bottom: 0;
    right: 0;
    background-color: #3b82f6;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 12px;
}

.edit-avatar span {
    display: none;
}

.profile-details {
    flex: 1;
}

.profile-details h2 {
    font-size: 24px;
    margin-bottom: 4px;
}

.membership-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    margin-top: 8px;
}

.membership-badge.premium {
    background-color: #f59e0b;
    color: #7f1d1d;
}

.membership-badge.basic {
    background-color: #6b7280;
    color: white;
}

.membership-badge.demo {
    background-color: #3b82f6;
    color: white;
}

/* Tabs */
.profile-tabs {
    margin-top: 20px;
}

.nav-tabs {
    display: flex;
    border-bottom: 1px solid #374151;
    margin-bottom: 20px;
    list-style: none;
    padding: 0;
}

.nav-tabs li {
    padding: 12px 20px;
    cursor: pointer;
    margin-right: 4px;
    color: #9ca3af;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
}

.nav-tabs li:hover {
    color: white;
}

.nav-tabs li.active {
    color: white;
    border-bottom-color: #3b82f6;
}

.tab-content {
    margin-top: 20px;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

.tab-pane h3 {
    font-size: 20px;
    margin-bottom: 20px;
    color: white;
}

/* Forms */
.profile-form {
    max-width: 600px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #e5e7eb;
}

.form-group input, 
.form-group textarea, 
.form-group select {
    width: 100%;
    padding: 10px;
    background-color: #374151;
    border: 1px solid #4b5563;
    border-radius: 4px;
    color: white;
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
}

.form-actions {
    margin-top: 30px;
}

.btn-primary {
    background-color: #3b82f6;
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.btn-primary:hover {
    background-color: #2563eb;
}

.btn-secondary {
    background-color: #6b7280;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s ease;
}

.btn-secondary:hover {
    background-color: #4b5563;
}

.btn-text {
    background: none;
    border: none;
    color: #3b82f6;
    padding: 0;
    cursor: pointer;
    font-size: 14px;
    text-decoration: underline;
}

.password-section {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #374151;
}

/* Watchlist */
.watchlist-items {
    margin-top: 20px;
}

.movies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.movie-card {
    background-color: #272e3f;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
}

.movie-poster {
    position: relative;
    height: 280px;
    overflow: hidden;
}

.movie-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.movie-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.9), rgba(0,0,0,0.4), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: flex-end;
    padding: 20px;
}

.movie-card:hover .movie-overlay {
    opacity: 1;
}

.movie-actions {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 8px;
}

.btn-play, .btn-info, .btn-remove {
    padding: 8px;
    border-radius: 4px;
    text-align: center;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.btn-play {
    background-color: #3b82f6;
    color: white;
}

.btn-info {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
}

.btn-remove {
    background-color: #ef4444;
    color: white;
    border: none;
    width: 100%;
}

.movie-info {
    padding: 12px;
}

.movie-info h4 {
    font-size: 16px;
    margin-bottom: 4px;
    color: white;
}

.movie-meta {
    display: flex;
    gap: 10px;
    color: #9ca3af;
    font-size: 14px;
}

.empty-watchlist {
    text-align: center;
    padding: 40px 0;
    color: #9ca3af;
}

.empty-watchlist i {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

/* Preferences Section */
.preferences-section {
    margin-bottom: 30px;
}

.preferences-section h4 {
    font-size: 18px;
    margin-bottom: 16px;
    color: white;
}

.category-toggles {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.category-toggle {
    display: inline-flex;
    align-items: center;
    background-color: #374151;
    border-radius: 20px;
    padding: 6px 12px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.category-toggle:hover {
    background-color: #4b5563;
}

.category-toggle input {
    margin-right: 8px;
}

.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #4b5563;
    transition: 0.4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: 0.4s;
}

input:checked + .slider {
    background-color: #3b82f6;
}

input:checked + .slider:before {
    transform: translateX(26px);
}

.slider.round {
    border-radius: 24px;
}

.slider.round:before {
    border-radius: 50%;
}

/* Billing Tab */
.subscription-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 40px;
}

.subscription-details, .payment-method {
    background-color: #272e3f;
    padding: 20px;
    border-radius: 8px;
}

.subscription-details h4, .payment-method h4 {
    font-size: 18px;
    margin-bottom: 16px;
    color: white;
}

.plan-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 10px;
}

.plan-badge.premium {
    background-color: #f59e0b;
    color: #7f1d1d;
}

.plan-badge.basic {
    background-color: #6b7280;
    color: white;
}

.plan-actions {
    display: flex;
    gap: 10px;
    margin-top: 16px;
}

.card-info {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.card-info i {
    font-size: 24px;
    color: #9ca3af;
}

.billing-history {
    background-color: #272e3f;
    padding: 20px;
    border-radius: 8px;
}

.billing-history h4 {
    font-size: 18px;
    margin-bottom: 16px;
    color: white;
}

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

.billing-table th, .billing-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #374151;
}

.billing-table th {
    font-weight: 600;
    color: #e5e7eb;
}

.status-badge {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12px;
    text-transform: capitalize;
}

.status-badge.paid {
    background-color: #10b981;
    color: white;
}

.status-badge.pending {
    background-color: #f59e0b;
    color: white;
}

.status-badge.demo {
    background-color: #3b82f6;
    color: white;
}

@media (max-width: 768px) {
    .profile-section {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .profile-avatar {
        margin-right: 0;
        margin-bottom: 20px;
    }
    
    .subscription-info {
        grid-template-columns: 1fr;
    }
    
    .nav-tabs {
        flex-wrap: wrap;
    }
    
    .nav-tabs li {
        padding: 8px 12px;
    }
}