/*
================================================================================
| ROOBUX - ULTRA PREMIUM DESIGN SYSTEM v4.0 | profile.css
================================================================================
| Professional tech-savvy profile page with refined animations
| Features: Clean layout, glassmorphism, smooth interactions
================================================================================
*/

/* ===== PERFORMANCE OPTIMIZATIONS ===== */
.profile-header,
.stat-card,
.card,
.toggle-switch {
    backface-visibility: hidden;
    transform: translateZ(0);
    -webkit-font-smoothing: antialiased;
}

/* ===== PROFESSIONAL ANIMATIONS ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes subtleGlow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(0, 153, 255, 0.15);
    }
    50% {
        box-shadow: 0 0 30px rgba(0, 153, 255, 0.25);
    }
}

@keyframes avatarPulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(0, 153, 255, 0.4),
                    0 0 20px rgba(0, 153, 255, 0.3);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(0, 153, 255, 0),
                    0 0 30px rgba(0, 153, 255, 0.4);
    }
}

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

/* ===== 1. PROFILE HEADER ===== */
.profile-header {
    background: linear-gradient(135deg, 
        rgba(13, 17, 23, 0.95) 0%, 
        rgba(22, 27, 34, 0.9) 100%);
    border: 1.5px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 40px;
    display: flex;
    align-items: center;
    gap: 32px;
    margin-bottom: 40px;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    animation: fadeInUp 0.8s cubic-bezier(0.23, 1, 0.32, 1);
}

/* Subtle background gradient */
.profile-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 50%, 
        rgba(0, 153, 255, 0.05) 0%, 
        transparent 60%);
    pointer-events: none;
    animation: shimmer 20s linear infinite;
}

.profile-header:hover {
    border-color: rgba(0, 153, 255, 0.3);
    box-shadow: 0 0 40px rgba(0, 153, 255, 0.15);
    transform: translateY(-3px);
}

/* Avatar Styles */
.profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    flex-shrink: 0;
    border: 4px solid transparent;
    background: linear-gradient(var(--color-bg-card), var(--color-bg-card)) padding-box,
                linear-gradient(135deg, var(--color-primary), var(--color-accent)) border-box;
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    position: relative;
    z-index: 1;
    animation: avatarPulse 3s ease-in-out infinite;
    object-fit: cover;
}

.profile-avatar:hover {
    transform: scale(1.08) rotate(3deg);
    box-shadow: 0 0 40px rgba(0, 153, 255, 0.4);
}

/* Profile Info */
.profile-info {
    flex: 1;
    position: relative;
    z-index: 1;
}

.profile-info h2 {
    margin: 0 0 12px 0;
    color: var(--color-text-primary);
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    transition: color 0.3s ease;
}

.profile-header:hover .profile-info h2 {
    color: var(--color-primary);
}

.profile-info-email {
    font-size: 1.1rem;
    color: var(--color-text-secondary);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: color 0.3s ease;
}

.profile-info-email:hover {
    color: var(--color-text-primary);
}

.profile-info-sub {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    font-family: var(--font-mono);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(0, 153, 255, 0.05);
    padding: 10px 16px;
    border-radius: 10px;
    border: 1px solid rgba(0, 153, 255, 0.2);
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    font-weight: 600;
}

.profile-info-sub:hover {
    background: rgba(0, 153, 255, 0.1);
    border-color: rgba(0, 153, 255, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 153, 255, 0.15);
}

.profile-info-sub .copy-btn {
    background: none;
    border: none;
    color: var(--color-text-secondary);
    cursor: pointer;
    font-size: 0.9rem;
    padding: 4px;
    transition: all 0.3s ease;
    border-radius: 6px;
}

.profile-info-sub .copy-btn:hover {
    color: var(--color-primary);
    background: rgba(0, 153, 255, 0.1);
    transform: scale(1.1);
}

/* ===== 2. STAT CARDS ===== */
.stat-cards-grid {
    display: grid;
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    border: 1.5px solid rgba(255, 255, 255, 0.08);
    padding: 24px;
    animation: fadeInUp 0.8s cubic-bezier(0.23, 1, 0.32, 1) backwards;
}

.stat-card:nth-child(1) { animation-delay: 0.1s; }
.stat-card:nth-child(2) { animation-delay: 0.2s; }
.stat-card:nth-child(3) { animation-delay: 0.3s; }
.stat-card:nth-child(4) { animation-delay: 0.4s; }

.stat-card:hover {
    transform: translateY(-4px);
    border-color: rgba(0, 153, 255, 0.3);
    box-shadow: 0 0 30px rgba(0, 153, 255, 0.15);
}

/* ===== 3. PROFILE GRID LAYOUT ===== */
.profile-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 32px;
    margin-top: 40px;
}

.profile-column-main {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.profile-column-main > * {
    animation: fadeInUp 0.8s cubic-bezier(0.23, 1, 0.32, 1) backwards;
}

.profile-column-main > *:nth-child(1) { animation-delay: 0.5s; }
.profile-column-main > *:nth-child(2) { animation-delay: 0.6s; }

.profile-column-side {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.profile-column-side > * {
    animation: slideInRight 0.8s cubic-bezier(0.23, 1, 0.32, 1) backwards;
}

.profile-column-side > *:nth-child(1) { animation-delay: 0.5s; }
.profile-column-side > *:nth-child(2) { animation-delay: 0.6s; }

/* ===== 4. CARD ENHANCEMENTS ===== */
.card {
    border: 1.5px solid rgba(255, 255, 255, 0.08);
    padding: 28px;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    background: linear-gradient(135deg, 
        rgba(13, 17, 23, 0.95) 0%, 
        rgba(22, 27, 34, 0.9) 100%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.card:hover {
    border-color: rgba(0, 153, 255, 0.3);
    box-shadow: 0 0 30px rgba(0, 153, 255, 0.12);
    transform: translateY(-3px);
}

.card h3 {
    margin: 0 0 24px 0;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--color-text-primary);
    position: relative;
    display: inline-block;
}

.card h3::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
    transition: width 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    border-radius: 2px;
}

.card:hover h3::after {
    width: 100%;
}

/* ===== 5. INFO LIST ===== */
.info-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.info-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    gap: 24px;
    transition: all 0.3s ease;
}

.info-list li:last-child {
    border-bottom: none;
}

.info-list li:hover {
    padding-left: 8px;
    background: rgba(0, 153, 255, 0.02);
    border-radius: 8px;
    border-bottom-color: rgba(0, 153, 255, 0.2);
}

.info-list .label {
    font-weight: 600;
    color: var(--color-text-secondary);
    font-size: 0.9rem;
    flex-shrink: 0;
    transition: color 0.3s ease;
}

.info-list li:hover .label {
    color: var(--color-primary);
}

.info-list .value {
    font-weight: 600;
    color: var(--color-text-primary);
    font-size: 0.9rem;
    text-align: right;
    word-break: break-word;
    font-family: var(--font-mono);
}

.info-list .btn-link {
    font-size: 0.85rem;
    padding: 6px 14px;
    transition: all 0.3s ease;
    border-radius: 8px;
}

.info-list .btn-link:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 153, 255, 0.2);
}

/* ===== 6. NOTIFICATION TOGGLES ===== */
.toggle-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.toggle-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    transition: all 0.3s ease;
}

.toggle-list li:last-child {
    border-bottom: none;
}

.toggle-list li:hover {
    padding-left: 8px;
    background: rgba(0, 153, 255, 0.02);
    border-radius: 8px;
}

.toggle-label {
    font-weight: 600;
    color: var(--color-text-primary);
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

.toggle-list li:hover .toggle-label {
    color: var(--color-primary);
}

/* Modern Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 56px;
    height: 30px;
    flex-shrink: 0;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(139, 148, 158, 0.3), 
        rgba(110, 118, 129, 0.3));
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    border-radius: 34px;
    border: 1.5px solid rgba(255, 255, 255, 0.1);
}

.slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 3px;
    bottom: 2.5px;
    background: linear-gradient(135deg, #ffffff, #e6edf3);
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.slider:hover {
    border-color: rgba(0, 153, 255, 0.4);
    box-shadow: 0 0 15px rgba(0, 153, 255, 0.2);
}

input:checked + .slider {
    background: linear-gradient(135deg, var(--color-primary), #0066cc);
    border-color: var(--color-primary);
    box-shadow: 0 0 20px rgba(0, 153, 255, 0.4);
}

input:checked + .slider:before {
    transform: translateX(26px);
    box-shadow: 0 2px 10px rgba(0, 153, 255, 0.5);
}

input:focus + .slider {
    box-shadow: 0 0 20px rgba(0, 153, 255, 0.3);
}

/* ===== 7. ACCOUNT ACTIONS ===== */
.account-actions {
    margin-top: 24px;
}

.account-actions .btn {
    margin-top: 12px;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    font-weight: 600;
    padding: 12px 24px;
}

.account-actions .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 153, 255, 0.3);
}

.account-actions .btn-danger {
    background: linear-gradient(135deg, #f85149, #da3633);
    border: none;
}

.account-actions .btn-danger:hover {
    box-shadow: 0 8px 25px rgba(248, 81, 73, 0.4);
    transform: translateY(-2px);
}

/* ===== 8. FORM ELEMENTS ===== */
.form-group {
    margin-bottom: 24px;
}

.form-label {
    font-weight: 600;
    color: var(--color-text-primary);
    margin-bottom: 10px;
    display: block;
    font-size: 0.9rem;
}

.form-control {
    background: rgba(13, 17, 23, 0.6);
    border: 1.5px solid rgba(255, 255, 255, 0.1);
    color: var(--color-text-primary);
    padding: 12px 16px;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.form-control:focus {
    border-color: rgba(0, 153, 255, 0.5);
    box-shadow: 0 0 0 3px rgba(0, 153, 255, 0.1);
    background: rgba(13, 17, 23, 0.8);
}

/* ===== 9. BADGES & LABELS ===== */
.badge {
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
}

.badge:hover {
    transform: scale(1.05);
}

.badge-primary {
    background: rgba(0, 153, 255, 0.15);
    color: var(--color-primary);
    border: 1px solid rgba(0, 153, 255, 0.3);
}

.badge-success {
    background: rgba(34, 197, 94, 0.15);
    color: var(--color-success);
    border: 1px solid rgba(34, 197, 94, 0.3);
}

/* ===== 10. PERFORMANCE OPTIMIZATIONS ===== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* GPU Acceleration */
.profile-header,
.stat-card,
.card,
.toggle-switch,
.profile-avatar {
    transform: translateZ(0);
    will-change: transform;
}