/* Profile Page Styles */
:root {
    --primary: #ffd700;
    --primary-light: #fff9c4;
    --primary-dark: #ffc107;
    --primary-darker: #ffab00;
    --black: #000000;
    --black-light: #111111;
    --black-lighter: #1a1a1a;
    --bg-dark: #0a0a0a;
    --bg-darker: #000000;
    --bg-light: #1a1a1a;
    --bg-lighter: #2a2a2a;
    --text: #ffffff;
    --text-muted: #b3b3b3;
    --border: rgba(255, 215, 0, 0.2);
    --shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
    --glow: 0 0 10px rgba(255, 215, 0, 0.7);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --border-radius: 10px;
    --card-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* Base Styles */
@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

@keyframes glow {
    0% { box-shadow: 0 0 5px var(--primary), 0 0 10px var(--primary), 0 0 15px var(--primary); }
    50% { box-shadow: 0 0 10px var(--primary), 0 0 20px var(--primary), 0 0 30px var(--primary); }
    100% { box-shadow: 0 0 5px var(--primary), 0 0 10px var(--primary), 0 0 15px var(--primary); }
}

@keyframes borderGlow {
    0% { border-color: var(--primary); box-shadow: 0 0 5px var(--primary); }
    50% { border-color: var(--primary-light); box-shadow: 0 0 20px var(--primary); }
    100% { border-color: var(--primary); box-shadow: 0 0 5px var(--primary); }
}

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

body {
    padding-top: 80px; /* Add space for fixed header */
}

.profile-hero {
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 50%, #2a2a2a 100%);
    min-height: 100vh;
    padding: 2rem 0 4rem;
    color: var(--text);
    position: relative;
    overflow-x: hidden;
}

/* Add subtle grid pattern */
.profile-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(rgba(255, 215, 0, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 215, 0, 0.05) 1px, transparent 1px);
    background-size: 40px 40px;
    opacity: 0.3;
    pointer-events: none;
}

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

/* Main Layout */
.profile-content {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

@media (max-width: 992px) {
    .profile-content {
        grid-template-columns: 1fr;
    }
}

/* Sidebar Styles */
.profile-sidebar {
    position: relative;
}

/* Navigation */
.profile-nav-container {
    background: rgba(20, 20, 20, 0.8);
    border-radius: var(--border-radius);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 215, 0, 0.15);
    box-shadow: var(--card-shadow);
    overflow: hidden;
}

.profile-nav-container .nav-pills {
    padding: 1rem 0;
}

.profile-nav-container .nav-link {
    color: var(--text-muted);
    padding: 0.75rem 1.5rem;
    border-radius: 0;
    margin: 0.25rem 0;
    display: flex;
    align-items: center;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    border-left: 3px solid transparent;
}

.profile-nav-container .nav-link:hover,
.profile-nav-container .nav-link.active {
    background: rgba(255, 215, 0, 0.1);
    color: var(--primary);
    border-left-color: var(--primary);
}

.profile-nav-container .nav-link i {
    width: 24px;
    text-align: center;
    margin-right: 10px;
    font-size: 1.1em;
}

.profile-nav-container .nav-link.text-danger {
    color: #ff6b6b;
    margin-top: 1.5rem;
}

.profile-nav-container .nav-link.text-danger:hover {
    background: rgba(255, 107, 107, 0.1);
    color: #ff6b6b !important;
    border-left-color: #ff6b6b;
}

.profile-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,215,0,0.1) 0%, rgba(255,215,0,0) 70%);
    transform: rotate(45deg);
    pointer-events: none;
    transition: var(--transition);
}

.profile-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6), 0 0 30px rgba(255, 215, 0, 0.3);
}

.profile-card:hover::before {
    transform: rotate(45deg) translate(25%, 25%);
}

/* Avatar Section */
.profile-avatar-container {
    position: relative;
    display: inline-block;
    margin: 0 auto 1.5rem;
    width: 150px;
    height: 150px;
}

.profile-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
    transition: var(--transition);
    filter: grayscale(10%) contrast(110%);
    background: var(--bg-light);
}

.profile-avatar:hover {
    transform: scale(1.05) translateY(-5px);
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.8);
    filter: grayscale(0%) contrast(120%);
}

.avatar-edit-btn {
    position: absolute;
    bottom: 10px;
    right: 10px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary);
    color: var(--bg-darker);
    border: 2px solid var(--bg-darker);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 2;
}

.avatar-edit-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.5);
}

/* Profile Content */
.profile-content-card {
    background: rgba(20, 20, 20, 0.8);
    border-radius: var(--border-radius);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 215, 0, 0.15);
    box-shadow: var(--card-shadow);
    overflow: hidden;
    margin-bottom: 2rem;
    transition: var(--transition);
}

.profile-content-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.profile-content-header {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 215, 0, 0.1);
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.2);
}

.profile-content-header i {
    color: var(--primary);
    font-size: 1.5rem;
    margin-right: 0.75rem;
}

.profile-content-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
    color: var(--text);
}

.profile-content-body {
    padding: 2rem;
}

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

.profile-name {
    font-size: 1.75rem;
    font-weight: 600;
    margin: 0 0 0.5rem;
    color: var(--primary);
    text-align: center;
}

.profile-username {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    text-align: center;
    font-size: 1.1rem;
}

/* Forms */
.profile-form .form-label {
    color: var(--text);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.profile-form .form-control,
.profile-form .form-select {
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 215, 0, 0.2);
    color: var(--text);
    padding: 0.75rem 1rem;
    border-radius: 6px;
    transition: var(--transition);
}

.profile-form .form-control:focus,
.profile-form .form-select:focus {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: var(--primary);
    box-shadow: 0 0 0 0.25rem rgba(255, 215, 0, 0.25);
    color: var(--text);
}

.profile-form .input-group-text {
    background-color: rgba(255, 215, 0, 0.1);
    border: 1px solid rgba(255, 215, 0, 0.2);
    color: var(--primary);
    padding: 0.75rem 1rem;
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    border-radius: 6px;
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.875rem;
}

.btn-primary {
    background-color: var(--primary);
    border-color: var(--primary);
    color: var(--bg-darker);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);
}

.btn-outline-primary {
    color: var(--primary);
    border-color: var(--primary);
}

.btn-outline-primary:hover {
    background-color: var(--primary);
    border-color: var(--primary);
    color: var(--bg-darker);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
}

/* Password Strength Meter */
.password-strength {
    height: 4px;
    background: var(--bg-light);
    margin-top: 0.5rem;
    border-radius: 2px;
    overflow: hidden;
}

.strength-meter {
    height: 100%;
    width: 0;
    transition: width 0.3s ease;
}

/* Tabs */
.nav-tabs {
    border-bottom: 1px solid rgba(255, 215, 0, 0.1);
    margin-bottom: 1.5rem;
}

.nav-tabs .nav-link {
    color: var(--text-muted);
    border: none;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    position: relative;
    transition: var(--transition);
}

.nav-tabs .nav-link.active {
    color: var(--primary);
    background: transparent;
    border: none;
    border-bottom: 2px solid var(--primary);
}

.nav-tabs .nav-link:hover {
    color: var(--primary);
    border-color: transparent;
}

/* Alerts */
.alert {
    border: none;
    border-radius: 6px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.alert-success {
    background-color: rgba(40, 167, 69, 0.15);
    color: #28a745;
}

.alert-danger {
    background-color: rgba(220, 53, 69, 0.15);
    color: #dc3545;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .profile-content-body {
        padding: 1.5rem 1rem;
    }
    
    .profile-content-header {
        padding: 1.25rem 1rem;
    }
    
    .profile-content-header h2 {
        font-size: 1.25rem;
    }
    
    .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
}

.google-badge {
    display: inline-flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    color: var(--primary);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
}

.profile-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.nav-btn {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    cursor: pointer;
    text-align: left;
    display: flex;
    align-items: center;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.nav-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 215, 0, 0.2), transparent);
    transition: 0.5s;
    z-index: -1;
}

.nav-btn:hover::before {
    left: 100%;
}

.nav-btn:hover, .nav-btn.active {
    background: rgba(0, 0, 0, 0.5);
    color: var(--primary);
    border-color: var(--primary);
    transform: translateX(5px);
    box-shadow: 0 5px 15px rgba(255, 215, 0, 0.3);
}

/* Logout button styles */
.logout-btn {
    margin-top: 1.5rem;
    color: #ff6b6b !important;
    border-color: rgba(255, 107, 107, 0.3) !important;
    position: relative;
}

.logout-btn:hover {
    background: rgba(255, 107, 107, 0.1) !important;
    border-color: #ff6b6b !important;
}

.logout-btn i {
    color: #ff6b6b;
}

/* Add a subtle separator before logout button */
.logout-btn::before {
    content: '';
    position: absolute;
    top: -0.75rem;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--border);
    margin: 0 auto;
    width: 80%;
}

.nav-btn i {
    width: 20px;
    margin-right: 0.5rem;
}

/* Main Content Styles */
.profile-main {
    background: rgba(26, 26, 46, 0.9);
    border-radius: 15px;
    padding: 2rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    backdrop-filter: blur(10px);
}

.section-header {
    display: flex;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    position: relative;
    overflow: hidden;
}

.section-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
}

.section-header i {
    color: var(--primary);
    font-size: 1.5rem;
    margin-right: 0.75rem;
}

.section-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
}

/* Form Styles */
.profile-form {
    margin-top: 1.5rem;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

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

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
    font-weight: 500;
}

.form-label i {
    color: var(--primary);
    width: 20px;
}

.input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.form-input {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    color: var(--text);
    font-size: 1rem;
    transition: var(--transition);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.5);
}

.form-input:focus {
    background: rgba(0, 0, 0, 0.5);
    border-color: var(--primary);
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.3), inset 0 1px 3px rgba(0, 0, 0, 0.5);
    outline: none;
}

.form-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem rgba(255, 215, 0, 0.25);
    outline: none;
}

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

.toggle-password {
    position: absolute;
    right: 10px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.5rem;
    transition: color 0.3s ease;
}

.toggle-password:hover {
    color: var(--primary);
}

.form-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-darker) 100%);
    color: #000 !important;
    border: none;
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
    text-decoration: none !important;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: 0.5s;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.5);
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(255, 193, 7, 0.3);
}

/* Google Connected State */
.google-connected {
    text-align: center;
    padding: 2rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    border: 1px solid rgba(255, 215, 0, 0.2);
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.google-connected::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    animation: slide 2s linear infinite;
}

.google-connected:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    background: rgba(0, 0, 0, 0.4);
}

.google-icon {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: #ea4335;
    font-size: 2.5rem;
    border: 2px solid #ea4335;
}

.google-connected h3 {
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.google-connected p {
    color: var(--text-muted);
    max-width: 400px;
    margin: 0 auto 1.5rem;
}

/* Admin Panel */
.admin-panel {
    text-align: center;
    padding: 2rem 0;
}

.admin-icon {
    width: 100px;
    height: 100px;
    background: rgba(255, 215, 0, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: var(--primary);
    font-size: 2.5rem;
    border: 2px solid var(--primary);
}

.admin-panel h3 {
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.admin-panel p {
    color: var(--text-muted);
    max-width: 400px;
    margin: 0 auto 1.5rem;
}

.btn-admin {
    display: inline-flex;
    align-items: center;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--bg-darker);
    border: none;
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-admin:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 193, 7, 0.3);
    color: var(--bg-darker);
}

/* Responsive Styles */
@media (max-width: 992px) {
    .profile-layout {
        grid-template-columns: 1fr;
    }
    
    .profile-sidebar {
        max-width: 400px;
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .profile-container {
        padding: 0 1rem;
    }
    
    .profile-main {
        padding: 1.5rem;
    }
}

/* Tab Content Toggle */
.tab-content {
    display: none;
}

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

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