/* Profile Page Styles - Enhanced Glossy */
@import url('home.css');

.header .balance-btn {
    padding: 10px 20px;
    background: linear-gradient(135deg, var(--purple) 0%, var(--purple-dark) 100%);
    color: white;
    border: none;
    border-radius: 25px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    box-shadow: 0 4px 15px var(--purple-glow);
    position: relative;
    z-index: 1;
}

.main-content {
    padding: 16px;
    padding-bottom: 120px;
}

/* Success Popup */
.success-popup {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.success-popup.active {
    display: flex;
    opacity: 1;
}

.popup-content {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 40px 48px;
    text-align: center;
    border: 1px solid var(--glass-border);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: popIn 0.4s ease;
    position: relative;
    overflow: hidden;
}

.popup-content::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--glossy-overlay);
    pointer-events: none;
}

@keyframes popIn {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.popup-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    box-shadow: 0 8px 30px rgba(34, 197, 94, 0.4);
    position: relative;
    z-index: 1;
}

.popup-icon i {
    font-size: 40px;
    color: white;
}

.popup-content h2 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
    position: relative;
    z-index: 1;
}

.popup-content p {
    color: var(--text-secondary);
    font-size: 14px;
    position: relative;
    z-index: 1;
}

.popup-loader {
    width: 40px;
    height: 4px;
    background: var(--border);
    border-radius: 4px;
    margin: 24px auto 0;
    overflow: hidden;
    position: relative;
    z-index: 1;
}

.popup-loader::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 100%;
    background: linear-gradient(90deg, var(--purple) 0%, var(--purple-dark) 100%);
    animation: loading 2s ease-in-out;
}

@keyframes loading {
    0% {
        width: 0%;
    }

    100% {
        width: 100%;
    }
}

/* Profile Header - Glossy */
.profile-header {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 28px;
    background: linear-gradient(135deg, var(--purple) 0%, #6366f1 50%, var(--purple-dark) 100%);
    border-radius: 24px;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 12px 40px var(--purple-glow);
}

.profile-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, transparent 50%);
}

.avatar {
    width: 72px;
    height: 72px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    font-weight: 700;
    color: white;
    overflow: hidden;
    border: 3px solid rgba(255, 255, 255, 0.3);
    position: relative;
    z-index: 1;
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-info {
    position: relative;
    z-index: 1;
}

.profile-info h2 {
    color: white;
    font-size: 22px;
    margin-bottom: 6px;
}

.profile-info p {
    color: rgba(255, 255, 255, 0.85);
    font-size: 14px;
}

.profile-info #balance {
    font-weight: 700;
    color: white;
}

.refresh-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    cursor: pointer;
    padding: 6px;
    border-radius: 50%;
    margin-left: 6px;
    transition: all 0.3s ease;
}

.refresh-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(180deg);
}

/* Stats Grid - Glossy */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.stat-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border-radius: 18px;
    padding: 22px;
    text-align: center;
    border: 1px solid var(--glass-border);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--glossy-overlay);
    pointer-events: none;
}

.stat-card.purple {
    border-left: 4px solid var(--purple);
}

.stat-card.green {
    border-left: 4px solid #22c55e;
}

.stat-card.blue {
    border-left: 4px solid #3b82f6;
}

.stat-card.orange {
    border-left: 4px solid #f59e0b;
}

.stat-value {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 6px;
    position: relative;
    z-index: 1;
}

.stat-label {
    font-size: 12px;
    color: var(--text-muted);
    position: relative;
    z-index: 1;
}

/* Account Section */
.account-section {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border-radius: 20px;
    padding: 24px;
    margin-bottom: 16px;
    border: 1px solid var(--glass-border);
    position: relative;
    overflow: hidden;
}

.account-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--glossy-overlay);
    pointer-events: none;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
    position: relative;
    z-index: 1;
}

.section-header i {
    font-size: 22px;
    color: var(--purple);
}

.section-header h3 {
    font-size: 16px;
    font-weight: 600;
}

.verified-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.12) 0%, rgba(34, 197, 94, 0.06) 100%);
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: 14px;
    color: #22c55e;
    font-weight: 600;
    margin-bottom: 18px;
    position: relative;
    z-index: 1;
}

.verified-badge i {
    font-size: 22px;
}

.info-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    position: relative;
    z-index: 1;
}

.info-item {
    display: flex;
    justify-content: space-between;
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
}

.info-item:last-child {
    border-bottom: none;
}

.info-label {
    color: var(--text-muted);
    font-size: 13px;
}

.info-value {
    color: var(--text-secondary);
    font-size: 13px;
}

/* Menu Section */
.menu-section {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 20px;
    border: 1px solid var(--glass-border);
    position: relative;
}

.menu-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--glossy-overlay);
    pointer-events: none;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 22px;
    text-decoration: none;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border);
    position: relative;
    z-index: 1;
    transition: all 0.3s ease;
}

.menu-item:last-child {
    border-bottom: none;
}

.menu-item:hover {
    background: var(--purple-light);
}

.menu-item i:first-child {
    font-size: 24px;
    color: var(--purple);
}

.menu-item span {
    flex: 1;
    font-weight: 500;
}

.menu-item i:last-child {
    color: var(--text-muted);
}

/* Logout Button */
.btn-logout {
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.12) 0%, rgba(239, 68, 68, 0.06) 100%);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 16px;
    color: #ef4444;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.btn-logout:hover {
    background: rgba(239, 68, 68, 0.2);
    transform: translateY(-2px);
}

/* Login/Register View */
.login-view {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 140px);
    padding: 20px;
}

.login-card {
    width: 100%;
    max-width: 420px;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border-radius: 28px;
    padding: 40px 28px;
    border: 1px solid var(--glass-border);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.login-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--glossy-overlay);
    pointer-events: none;
}

.login-header {
    text-align: center;
    margin-bottom: 32px;
    position: relative;
    z-index: 1;
}

.login-logo {
    font-family: 'Outfit', sans-serif;
    font-size: 32px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.login-logo span {
    color: var(--purple);
}

.login-header p {
    color: var(--text-secondary);
    font-size: 14px;
}

/* Google Login Button */
.btn-google {
    width: 100%;
    padding: 14px;
    background: var(--bg-card-solid);
    border: 2px solid var(--border);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
}

.btn-google:hover {
    border-color: var(--purple);
    background: rgba(139, 92, 246, 0.05);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btn-google img {
    width: 24px;
    height: 24px;
}

.btn-google span {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

.divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 500;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.form-group {
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.form-group label i {
    color: var(--purple);
    font-size: 16px;
}

.form-group input {
    width: 100%;
    padding: 16px 18px;
    background: var(--bg-card-solid);
    border: 2px solid var(--border);
    border-radius: 14px;
    color: var(--text-primary);
    font-size: 15px;
    outline: none;
    transition: all 0.3s ease;
}

.form-group input:focus {
    border-color: var(--purple);
    box-shadow: 0 0 15px var(--purple-glow);
}

.form-group input::placeholder {
    color: var(--text-muted);
}

.btn-submit {
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, var(--purple) 0%, var(--purple-dark) 100%);
    color: white;
    border: none;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    margin-top: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 6px 24px var(--purple-glow);
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.btn-submit:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 10px 32px var(--purple-glow);
}

.btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.register-link {
    text-align: center;
    margin-top: 24px;
    font-size: 14px;
    color: var(--text-muted);
    position: relative;
    z-index: 1;
}

.register-link a {
    color: var(--purple);
    font-weight: 600;
    text-decoration: none;
}

/* Spin animation */
.ri-spin {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}