/* Profile Page Styles - HentaiWorld */

/* Profile Header */
.profile-header {
    position: relative;
    margin-bottom: 2rem;
}

.profile-cover {
    position: relative;
    height: 280px;
    border-radius: 1rem;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(99, 102, 241, 0.05) 50%, transparent 100%);
}

.profile-cover::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 0%, transparent 50%, rgba(0, 0, 0, 0.8) 100%);
    z-index: 1;
}

.profile-cover-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.6;
}

.profile-content {
    position: relative;
    margin-top: -4rem;
    padding: 0 2rem;
    z-index: 2;
}

.profile-avatar-wrapper {
    position: relative;
    width: 140px;
    height: 140px;
    flex-shrink: 0;
    background: rgba(var(--color-soft-rgb), 0.95);
    backdrop-filter: blur(12px);
    border-radius: 50%;
    padding: 0.5rem;
    border: 4px solid rgba(var(--color-line-rgb), 0.6);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3), 0 0 0 2px rgba(var(--color-primary-rgb), 0.2);
}

.profile-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 3px solid var(--color-body);
    background: var(--color-body);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    object-fit: cover;
}

.profile-rank-badge {
    position: absolute;
    bottom: -8px;
    right: -8px;
    width: 44px;
    height: 44px;
    border-radius: 0.75rem;
    border: 4px solid var(--color-body);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.profile-rank-badge.admin {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.profile-rank-badge.premium {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.profile-info-box {
    background: var(--color-soft);
    backdrop-filter: none;
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    border: 1px solid var(--color-line);
    box-shadow: none;
    max-width: 600px;
}

.profile-username {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--color-lead);
    margin: 0;
    line-height: 1.2;
}

.profile-rank-label {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 0.875rem;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.profile-rank-label.admin {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.profile-rank-label.premium {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.profile-rank-label.google {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.3);
    gap: 0.375rem;
}

.profile-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    font-size: 0.875rem;
    color: var(--color-subs);
    margin-top: 0.75rem;
}

.profile-meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.profile-meta-item span[class^="ic-"] {
    font-size: 1.125rem;
}

/* Stats Cards */
.profile-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2.5rem;
}

.profile-stat-card {
    background: rgba(var(--color-soft-rgb), 0.6);
    border: 2px solid rgba(var(--color-line-rgb), 0.3);
    border-radius: 1rem;
    padding: 1.75rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(8px);
}

.profile-stat-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 0%, rgba(var(--color-primary-rgb), 0.03) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.profile-stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.profile-stat-card:hover::before {
    opacity: 1;
}

.profile-stat-card.watchlist {
    border-color: rgba(99, 102, 241, 0.5);
    background: rgba(99, 102, 241, 0.05);
}

.profile-stat-card.watchlist:hover {
    border-color: rgba(99, 102, 241, 0.8);
    background: rgba(99, 102, 241, 0.1);
}

.profile-stat-card.favorites {
    border-color: rgba(239, 68, 68, 0.5);
    background: rgba(239, 68, 68, 0.05);
}

.profile-stat-card.favorites:hover {
    border-color: rgba(239, 68, 68, 0.8);
    background: rgba(239, 68, 68, 0.1);
}

.profile-stat-card.comments {
    border-color: rgba(245, 158, 11, 0.5);
    background: rgba(245, 158, 11, 0.05);
}

.profile-stat-card.comments:hover {
    border-color: rgba(245, 158, 11, 0.8);
    background: rgba(245, 158, 11, 0.1);
}

.profile-stat-content {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    position: relative;
    z-index: 1;
}

.profile-stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 2rem;
    transition: transform 0.3s ease;
}

.profile-stat-card:hover .profile-stat-icon {
    transform: scale(1.1);
}

.profile-stat-icon.watchlist {
    background: rgba(99, 102, 241, 0.15);
    color: #6366f1;
}

.profile-stat-icon.favorites {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.profile-stat-icon.comments {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.profile-stat-info {
    flex: 1;
}

.profile-stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1;
    color: var(--color-lead);
    margin-bottom: 0.25rem;
}

.profile-stat-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-subs);
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

/* Tabs */
.profile-tabs {
    background: var(--color-soft);
    border: 1px solid rgba(var(--color-line-rgb), 0.4);
    border-radius: 1rem;
    overflow: hidden;
}

.profile-tabs-nav {
    display: flex;
    border-bottom: 1px solid rgba(var(--color-line-rgb), 0.4);
    background: rgba(var(--color-body-rgb), 0.3);
}

.profile-tab-btn {
    flex: 1;
    padding: 1.25rem 1.5rem;
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--color-subs);
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
}

.profile-tab-btn span[class^="ic-"] {
    font-size: 1.125rem;
}

.profile-tab-btn:hover {
    background: rgba(var(--color-soft-rgb), 0.5);
    color: var(--color-lead);
}

.profile-tab-btn.active {
    color: var(--color-primary);
    border-bottom-color: var(--color-primary);
    background: transparent;
}

.profile-tab-content {
    padding-top: 2rem;
}

.profile-empty-state {
    text-align: center;
    padding: 4rem 2rem;
}

.profile-empty-icon {
    width: 96px;
    height: 96px;
    border-radius: 1.25rem;
    background: rgba(var(--color-line-rgb), 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 3rem;
    color: var(--color-subs);
}

.profile-empty-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-lead);
    margin-bottom: 0.75rem;
}

.profile-empty-text {
    font-size: 1rem;
    color: var(--color-subs);
    margin-bottom: 2rem;
}

/* Edit Button */
.profile-edit-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.75rem 1.5rem;
    font-size: 0.9375rem;
    font-weight: 600;
    border-radius: 0.625rem;
    transition: all 0.2s ease;
    white-space: nowrap;
}

/* Responsive */
@media (max-width: 768px) {
    .profile-cover {
        height: 260px;
    }

    .profile-content {
        margin-top: -3rem;
        padding: 0 1.25rem;
    }

    .profile-avatar-wrapper {
        width: 120px;
        height: 120px;
        padding: 0.5rem;
        border-width: 3px;
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4), 0 0 0 2px rgba(var(--color-primary-rgb), 0.3);
    }

    .profile-rank-badge {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }

    .profile-username {
        font-size: 1.5rem;
    }

    .profile-info-box {
        padding: 1rem;
    }

    .profile-stat-number {
        font-size: 2rem;
    }

    .profile-stat-icon {
        width: 52px;
        height: 52px;
        font-size: 1.75rem;
    }

    .profile-tabs-nav {
        overflow-x: auto;
    }

    .profile-tab-btn {
        padding: 1rem;
        font-size: 0.875rem;
        white-space: nowrap;
    }

    .profile-tab-content {
        padding: 1.25rem;
    }
}

/* Dark mode adjustments */
@media (prefers-color-scheme: dark) {
    .profile-cover::before {
        background: linear-gradient(180deg, transparent 0%, transparent 50%, rgba(0, 0, 0, 0.9) 100%);
    }

    .profile-stat-card {
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    }

    .profile-stat-card:hover {
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    }
}
