/* profile.css - Modern Profile Page */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #5f9df3;
    --primary-dark: #3f7ad0;
    --primary-light: #8bb9ff;
    --secondary: #8b5cf6;
    --success: #10b981;
    --success-light: #d1fae5;
    --warning: #f59e0b;
    --warning-light: #fed7aa;
    --danger: #ef4444;
    --danger-light: #fee2e2;
    --dark: #0b0f17;
    --dark-light: #1a1f2e;
    --gray: #9ca3af;
    --light: #f3f4f6;
    --gradient-1: linear-gradient(135deg, #5f9df3, #8b5cf6);
    --gradient-2: linear-gradient(135deg, #f59e0b, #ef4444);
    --gradient-3: linear-gradient(135deg, #10b981, #059669);
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --shadow-glow: 0 0 20px rgba(95, 157, 243, 0.3);
}

body {
    font-family: 'Poppins', sans-serif;
    background: radial-gradient(circle at 10% 30%, #1e2b3f, #0b0f17);
    color: #eef5ff;
    line-height: 1.6;
    min-height: 100vh;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--dark-light);
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* Background Elements */
.bg-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(95, 157, 243, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(95, 157, 243, 0.05) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
    z-index: -1;
}

.floating-shapes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

.shape {
    position: absolute;
    background: rgba(95, 157, 243, 0.05);
    border-radius: 50%;
    filter: blur(60px);
    animation: float 20s infinite ease-in-out;
}

.shape1 {
    width: 300px;
    height: 300px;
    top: 10%;
    left: 5%;
    animation-duration: 25s;
}

.shape2 {
    width: 400px;
    height: 400px;
    bottom: -100px;
    right: -50px;
    background: rgba(139, 92, 246, 0.05);
    animation-duration: 30s;
}

.shape3 {
    width: 250px;
    height: 250px;
    top: 50%;
    left: 80%;
    background: rgba(16, 185, 129, 0.05);
    animation-duration: 22s;
}

.shape4 {
    width: 350px;
    height: 350px;
    top: 70%;
    left: 10%;
    background: rgba(245, 158, 11, 0.05);
    animation-duration: 28s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -40px) scale(1.1); }
    66% { transform: translate(-20px, 30px) scale(0.9); }
}

/* Navbar */
.head {
    padding: 1rem 2rem;
    background: rgba(10, 20, 35, 0.85);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(95, 157, 243, 0.2);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-lg);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
}

.left {
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(135deg, #fff, var(--primary-light));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    display: flex;
    align-items: center;
    gap: 10px;
}

.left i {
    color: var(--primary);
    background: rgba(95, 157, 243, 0.2);
    padding: 8px;
    border-radius: 12px;
}

.right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.right a {
    color: #cddfff;
    text-decoration: none;
    padding: 0.6rem 1.2rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    border-radius: 30px;
    transition: all 0.3s;
}

.right a:hover {
    background: rgba(95, 157, 243, 0.15);
    color: white;
}

.right a.active {
    background: rgba(95, 157, 243, 0.2);
    color: white;
}

.auth-btn {
    background: var(--gradient-1);
    color: white !important;
    padding: 0.6rem 1.8rem !important;
    box-shadow: 0 4px 15px rgba(95, 157, 243, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.auth-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(95, 157, 243, 0.5);
}

.mobile-menu-btn {
    display: none;
    font-size: 1.8rem;
    color: white;
    cursor: pointer;
}

/* Main Container */
.container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem;
    min-height: calc(100vh - 200px);
}

/* Page Header */
.page-header {
    margin-bottom: 2rem;
    animation: slideDown 0.8s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.header-content {
    text-align: center;
}

.header-content h1 {
    font-size: 2.8rem;
    margin-bottom: 0.5rem;
}

.gradient-text {
    background: var(--gradient-1);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.header-subtitle {
    font-size: 1.2rem;
    color: var(--gray);
}

/* Loading State */
.loading-state {
    text-align: center;
    padding: 4rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    margin-bottom: 2rem;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(95, 157, 243, 0.3);
    border-top-color: var(--primary);
    border-radius: 50%;
    margin: 0 auto 1rem;
    animation: spin 1s infinite linear;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Profile Container */
.profile-container {
    animation: fadeInUp 0.8s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Profile Card */
.profile-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 30px;
    padding: 2rem;
    backdrop-filter: blur(10px);
    margin-bottom: 2rem;
    transition: all 0.3s;
}

.profile-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-glow);
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.profile-avatar {
    position: relative;
    width: 120px;
    height: 120px;
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--primary);
    box-shadow: 0 0 30px rgba(95, 157, 243, 0.3);
}

.profile-avatar i {
    font-size: 120px;
    color: var(--primary);
    opacity: 0.8;
}

.avatar-badge {
    position: absolute;
    bottom: 5px;
    right: 5px;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    border: 2px solid var(--dark-light);
}

.avatar-badge.admin {
    background: linear-gradient(135deg, #8b5cf6, #6d28d9);
}

.avatar-badge.user {
    background: linear-gradient(135deg, #10b981, #059669);
}

.profile-title h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.role-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 0.4rem 1.2rem;
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 600;
}

.role-badge.admin {
    background: rgba(139, 92, 246, 0.2);
    color: #8b5cf6;
    border: 1px solid rgba(139, 92, 246, 0.3);
}

.role-badge.user {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

/* Profile Stats */
.profile-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 16px;
    transition: all 0.3s;
}

.stat-item:hover {
    background: rgba(0, 0, 0, 0.3);
    transform: translateY(-2px);
}

.stat-item i {
    font-size: 2rem;
    color: var(--primary);
}

.stat-detail {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    line-height: 1.2;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--gray);
}

/* Profile Info */
.profile-info {
    display: grid;
    gap: 1rem;
    margin-bottom: 2rem;
}

.info-group {
    padding: 1rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
}

.info-group label {
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--primary-light);
    font-size: 0.9rem;
    margin-bottom: 0.3rem;
}

.info-group label i {
    color: var(--primary);
}

.info-group p {
    font-size: 1.1rem;
    color: white;
    padding-left: 1.5rem;
}

/* Profile Actions */
.profile-actions {
    display: flex;
    justify-content: flex-end;
}

.btn-primary, .btn-secondary, .btn-danger {
    padding: 1rem 2rem;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: 'Poppins', sans-serif;
}

.btn-primary {
    background: var(--gradient-1);
    color: white;
    box-shadow: 0 10px 20px -5px rgba(95, 157, 243, 0.4);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px -5px rgba(95, 157, 243, 0.6);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-3px);
    border-color: var(--primary);
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px -5px rgba(239, 68, 68, 0.4);
}

/* Profile Tabs */
.profile-tabs {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 30px;
    padding: 2rem;
    backdrop-filter: blur(10px);
}

.tabs-header {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 1rem;
}

.tab-btn {
    padding: 0.8rem 1.5rem;
    background: none;
    border: none;
    color: var(--gray);
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
    border-radius: 30px;
}

.tab-btn:hover {
    color: white;
    background: rgba(95, 157, 243, 0.1);
}

.tab-btn.active {
    color: white;
    background: rgba(95, 157, 243, 0.2);
}

.tab-btn i {
    color: var(--primary);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Activity List */
.activity-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 16px;
    transition: all 0.3s;
}

.activity-item:hover {
    background: rgba(0, 0, 0, 0.3);
    transform: translateX(5px);
}

.activity-item i {
    font-size: 1.5rem;
    width: 40px;
    text-align: center;
}

.activity-details {
    flex: 1;
}

.activity-details p {
    margin-bottom: 0.2rem;
}

.activity-time {
    font-size: 0.8rem;
    color: var(--gray);
}

.activity-score {
    font-weight: 600;
    color: var(--success);
}

/* Achievements Grid */
.achievements-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.achievement-card {
    text-align: center;
    padding: 1.5rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 16px;
    transition: all 0.3s;
}

.achievement-card:hover {
    transform: translateY(-5px);
    background: rgba(0, 0, 0, 0.3);
}

.achievement-card i {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.achievement-card h4 {
    margin-bottom: 0.5rem;
    color: var(--primary-light);
}

.achievement-card p {
    color: var(--gray);
    font-size: 0.9rem;
}

/* Settings Form */
.settings-form {
    max-width: 500px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--primary-light);
    margin-bottom: 0.5rem;
}

.form-input {
    width: 100%;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: white;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    transition: all 0.3s;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(0, 0, 0, 0.3);
}

.form-input[readonly] {
    background: rgba(0, 0, 0, 0.1);
    cursor: not-allowed;
}

.form-group input[type="checkbox"] {
    margin-right: 10px;
}

/* Footer */
.foot {
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding: 4rem 2rem 2rem;
    margin-top: 4rem;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-section h3 {
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--primary-light);
}

.footer-section h3 i {
    color: var(--primary);
}

.footer-section p {
    color: var(--gray);
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.8rem;
}

.footer-section ul li a {
    color: var(--gray);
    text-decoration: none;
    transition: all 0.3s;
}

.footer-section ul li a:hover {
    color: var(--primary);
    padding-left: 5px;
}

.contact-info li {
    color: var(--gray);
    display: flex;
    align-items: center;
    gap: 10px;
}

.contact-info i {
    color: var(--primary);
    width: 20px;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray);
    text-decoration: none;
    transition: all 0.3s;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.social-links a:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-3px);
}

.footer-bottom {
    max-width: 1400px;
    margin: 0 auto;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    text-align: center;
    color: var(--gray);
    font-size: 0.9rem;
}

.footer-bottom a {
    color: var(--gray);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-bottom a:hover {
    color: var(--primary);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .profile-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .achievements-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-content {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: block;
    }
    
    .right {
        display: none;
        position: absolute;
        top: 80px;
        left: 0;
        width: 100%;
        background: rgba(10, 20, 35, 0.95);
        backdrop-filter: blur(14px);
        padding: 2rem;
        flex-direction: column;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        z-index: 1000;
    }
    
    .right.show {
        display: flex;
    }
    
    .right a {
        width: 100%;
        justify-content: center;
    }
    
    .profile-header {
        flex-direction: column;
        text-align: center;
    }
    
    .profile-stats {
        grid-template-columns: 1fr;
    }
    
    .tabs-header {
        flex-direction: column;
    }
    
    .achievements-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .header-content h1 {
        font-size: 2rem;
    }
    
    .profile-avatar {
        width: 100px;
        height: 100px;
    }
    
    .profile-title h2 {
        font-size: 1.5rem;
    }
    
    .stat-item {
        flex-direction: column;
        text-align: center;
    }
    
    .profile-actions {
        justify-content: center;
    }
    
    .btn-danger {
        width: 100%;
        justify-content: center;
    }
}