/* --- AUTH SYSTEM --- */
.profile-container { position: relative; display: flex; align-items: center; }
.profile-btn {
    background: none; border: 1.5px solid transparent; color: var(--text-muted); cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.3s; font-size: 2rem !important; padding: 0;
    width: auto; height: auto; min-width: unset; min-height: unset;
    max-width: unset; max-height: unset;
    border-radius: 0; overflow: visible;
}
.profile-btn:hover { color: var(--primary); filter: drop-shadow(0 0 8px rgba(0,243,255,0.6)); transform: scale(1.15); }
.nav-icon { transition: all 0.3s; font-size: 2rem !important; }
.nav-icon:hover { color: var(--primary) !important; filter: drop-shadow(0 0 8px rgba(0,243,255,0.6)); transform: scale(1.15); }
.profile-btn img {
    width: 1.1em; height: 1.1em; border-radius: 50% !important; object-fit: cover; display: block;
}
.profile-dropdown {
    position: absolute; top: calc(100% + 12px); right: 0; width: 240px;
    background: linear-gradient(180deg, rgba(8,8,25,0.98), rgba(2,2,8,0.99));
    border: 1px solid rgba(0,243,255,0.2); border-radius: 12px;
    padding: 12px; z-index: 9999;
    opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: all 0.3s var(--ease);
    box-shadow: 0 10px 40px rgba(0,0,0,0.6);
    backdrop-filter: blur(20px);
    max-height: 80vh;
    overflow-y: auto;
    scrollbar-width: thin;
}
.profile-dropdown.open { opacity: 1; visibility: visible; transform: translateY(0); }
.profile-dropdown::before {
    content: ''; position: absolute; top: -6px; right: 14px;
    width: 12px; height: 12px; background: rgba(8,8,25,0.98);
    border-left: 1px solid rgba(0,243,255,0.2); border-top: 1px solid rgba(0,243,255,0.2);
    transform: rotate(45deg);
}
.auth-dropdown-btn {
    width: 100%; padding: 12px 16px; border: none; border-radius: 8px;
    font-weight: 600; font-size: 0.9rem; cursor: pointer;
    transition: all 0.3s; display: flex; align-items: center; gap: 10px;
    font-family: var(--font-body); letter-spacing: 0.5px;
}
.auth-dropdown-btn.signin {
    background: linear-gradient(135deg, var(--primary), #0088ff); color: #fff;
    margin-bottom: 8px;
}
.auth-dropdown-btn.signin:hover { box-shadow: 0 0 20px rgba(0,243,255,0.3); transform: translateY(-1px); }
.auth-dropdown-btn.signup {
    background: transparent; border: 1px solid rgba(255,215,0,0.3); color: var(--accent);
}
.auth-dropdown-btn.signup:hover { border-color: var(--accent); box-shadow: 0 0 15px rgba(255,215,0,0.15); transform: translateY(-1px); }
.profile-dropdown-link {
    display: flex; align-items: center; gap: 10px; padding: 10px 12px;
    color: var(--text-muted); text-decoration: none; border-radius: 8px;
    font-size: 0.85rem; transition: all 0.3s; cursor: pointer; border: none;
    background: none; width: 100%; text-align: left; font-family: var(--font-body);
}
.profile-dropdown-link:hover { background: rgba(0,243,255,0.08); color: var(--primary); }
.profile-dropdown-link i { width: 18px; text-align: center; font-size: 0.9rem; }
.profile-dropdown-divider { border-top: 1px solid rgba(255,255,255,0.06); margin: 6px 0; }
.profile-dropdown-uid { color: var(--text-muted); font-size: 0.7rem; text-align: center; margin-top: 4px; letter-spacing: 1px; opacity: 0.7; }
.profile-language-wrap { position: relative; }
.profile-dropdown .lang-dropdown {
    top: calc(100% + 6px);
    right: 0;
    left: auto;
    width: 100%;
    min-width: 160px;
    transform: translateY(-8px);
}
.profile-dropdown .lang-dropdown.open { transform: translateY(0); }
.navbar-collapse .navbar-nav {
    list-style: none;
}
.navbar-collapse .nav-link-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    margin-left: auto;
    padding: 0 6px;
    border-radius: 999px;
    background: #ff335f;
    color: #fff;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0;
    line-height: 1;
}
.navbar-collapse .nav-link-meta-icon {
    margin-left: auto;
    font-size: 0.65rem;
    color: rgba(255,255,255,0.45);
}
.navbar-collapse .nav-link-locked {
    opacity: 0.6;
}
.navbar-collapse .nav-link-highlighted > span,
.navbar-collapse .nav-link-danger > span {
    color: inherit;
}
.navbar-collapse .nav-link-danger {
    color: var(--secondary) !important;
}
.navbar-collapse .nav-link-danger:hover {
    color: #ff6b93 !important;
}

/* --- MULTI-STEP SIGNUP WIZARD --- */
.signup-progress { display: flex; align-items: center; justify-content: center; margin-bottom: 24px; gap: 0; }
.signup-step-dot {
    width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-size: 0.75rem; font-weight: 700; border: 2px solid rgba(255,255,255,0.15);
    color: var(--text-muted); background: rgba(255,255,255,0.03); transition: all 0.4s;
}
.signup-step-dot.active { border-color: var(--primary); color: var(--primary); background: rgba(0,243,255,0.1); box-shadow: 0 0 15px rgba(0,243,255,0.2); }
.signup-step-dot.done { border-color: #00ff64; color: #00ff64; background: rgba(0,255,100,0.1); }
.signup-step-line { width: 30px; height: 2px; background: rgba(255,255,255,0.1); transition: background 0.4s; }
.signup-step-line.done { background: linear-gradient(90deg, #00ff64, var(--primary)); }
.signup-wizard-step { display: none; animation: fadeInUp 0.3s ease; }
.signup-wizard-step.active { display: block; }
.auth-field select {
    width: 100%; padding: 12px 16px; border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.1); background: rgba(255,255,255,0.04);
    color: #fff; font-size: 0.95rem; font-family: var(--font-body);
    outline: none; transition: all 0.3s; appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2300f3ff' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 16px center;
}
.auth-field select:focus { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(0,243,255,0.1); }
.auth-field select option { background: #0a0a2e; color: #fff; }
.auth-row { display: flex; gap: 12px; }
.auth-row .auth-field { flex: 1; }
.auth-check-row { display: flex; gap: 16px; margin-bottom: 16px; }
.auth-check-item {
    flex: 1; padding: 14px; border: 1px solid rgba(255,255,255,0.1); border-radius: 10px;
    background: rgba(255,255,255,0.03); cursor: pointer; text-align: center;
    transition: all 0.3s; position: relative;
}
.auth-check-item:hover { border-color: rgba(0,243,255,0.3); background: rgba(0,243,255,0.05); }
.auth-check-item.selected { border-color: var(--primary); background: rgba(0,243,255,0.1); box-shadow: 0 0 15px rgba(0,243,255,0.15); }
.auth-check-item i { font-size: 1.5rem; margin-bottom: 6px; display: block; }
.auth-check-item span { font-size: 0.8rem; color: var(--text-muted); }
.auth-check-item.selected span { color: var(--primary); }
.auth-check-item input { display: none; }
.signup-back-btn {
    background: none; border: 1px solid rgba(255,255,255,0.12); color: var(--text-muted);
    padding: 12px; border-radius: 8px; cursor: pointer; font-family: var(--font-body);
    font-size: 0.9rem; transition: all 0.3s; width: 100%; margin-top: 8px;
}
.signup-back-btn:hover { border-color: var(--primary); color: var(--primary); }

/* --- PROFILE PAGE SECTION --- */
/* ============================================================
   ULTIMATE PROFILE v3 - YouTube+FB+IG+X+TikTok+Tinder+Twitch
   ============================================================ */
.profile-page { display: none; min-height: 100vh; padding-top: 0; }
.profile-page.active { display: block; }

/* Cover Banner */
.profile-cover {
    position: relative; width: 100%; height: 320px;
    background: linear-gradient(135deg, rgba(0,243,255,0.12), rgba(255,0,85,0.08), rgba(255,215,0,0.06));
    overflow: hidden;
}
.profile-cover::after {
    content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 140px;
    background: linear-gradient(transparent, var(--dark-bg)); pointer-events: none;
}
.profile-cover img { width: 100%; height: 100%; object-fit: cover; }
.profile-cover-edit {
    position: absolute; bottom: 16px; right: 16px; z-index: 3;
    background: rgba(0,0,0,0.7); border: 1px solid rgba(0,243,255,0.3); color: var(--primary);
    padding: 8px 16px; border-radius: 20px; cursor: pointer; font-size: 0.75rem;
    backdrop-filter: blur(12px); transition: all 0.3s;
}
.profile-cover-edit:hover { background: rgba(0,243,255,0.15); transform: scale(1.05); }

/* Header */
.profile-header-info {
    display: flex; align-items: flex-end; gap: 20px; margin-top: -75px;
    padding: 0 24px; position: relative; z-index: 2;
}
.profile-avatar-wrap { position: relative; flex-shrink: 0; }
.profile-avatar-large {
    width: 150px; height: 150px; border-radius: 50%; border: 4px solid var(--dark-bg);
    background: linear-gradient(135deg, var(--primary), #0088ff, var(--secondary));
    display: flex; align-items: center; justify-content: center;
    font-size: 3.2rem; font-weight: 700; color: #fff; font-family: var(--font-title);
    overflow: hidden; position: relative; cursor: pointer;
    box-shadow: 0 0 30px rgba(0,243,255,0.25), 0 0 60px rgba(0,243,255,0.1);
    transition: all 0.4s var(--ease);
}
.profile-avatar-large:hover { box-shadow: 0 0 40px rgba(0,243,255,0.4), 0 0 80px rgba(0,243,255,0.15); transform: scale(1.03); }
.profile-avatar-large img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.profile-avatar-large .avatar-edit-overlay {
    position: absolute; inset: 0; background: rgba(0,0,0,0.6);
    display: none; align-items: center; justify-content: center;
    font-size: 1.5rem; color: #fff; border-radius: 50%;
}
.profile-avatar-large:hover .avatar-edit-overlay { display: flex; }
.profile-online-dot {
    position: absolute; bottom: 8px; right: 8px; width: 20px; height: 20px;
    border-radius: 50%; border: 3px solid var(--dark-bg);
    background: #00e676; box-shadow: 0 0 10px rgba(0,230,118,0.6);
}
.profile-online-dot.offline { background: #666; box-shadow: none; }
.profile-level-ring {
    position: absolute; inset: -6px; border-radius: 50%;
    border: 3px solid transparent; border-top-color: var(--accent); border-right-color: var(--accent);
    animation: profileRingSpin 3s linear infinite;
}
@keyframes profileRingSpin { to { transform: rotate(360deg); } }

/* Name + Bio area */
.profile-header-text { padding-bottom: 10px; flex: 1; min-width: 0; }
.profile-header-text h2 {
    margin: 0; font-size: 1.8rem; color: #fff; display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}
.profile-verified-badge {
    display: inline-flex; align-items: center; justify-content: center;
    width: 22px; height: 22px; border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), #0088ff);
    font-size: 0.6rem; color: #fff; flex-shrink: 0;
}

.profile-header-text .profile-uid { color: var(--primary); font-size: 0.78rem; letter-spacing: 2px; margin-top: 3px; opacity: 0.8; }
.profile-header-text .profile-uid i { cursor: pointer; margin-left: 6px; opacity: 0.6; transition: all 0.3s; }
.profile-header-text .profile-uid i:hover { opacity: 1; color: var(--accent); }
.profile-header-text .profile-bio-text { color: rgba(255,255,255,0.72); font-size: 0.85rem; margin-top: 6px; max-width: 520px; line-height: 1.5; }
.profile-header-meta {
    display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; font-size: 0.75rem; color: var(--text-muted);
}
.profile-header-meta span { display: flex; align-items: center; gap: 4px; }
.profile-header-meta i { font-size: 0.7rem; color: var(--primary); opacity: 0.6; }

/* Subscribe bar */
.profile-subscribe-bar {
    display: flex; align-items: center; gap: 12px; margin-top: 10px; flex-wrap: wrap;
}
.profile-subscribe-btn {
    padding: 8px 24px; border-radius: 20px; font-family: var(--font-body);
    font-weight: 700; font-size: 0.78rem; cursor: pointer; transition: all 0.3s;
    letter-spacing: 0.5px; border: none;
    background: linear-gradient(135deg, var(--secondary), #cc0044); color: #fff;
}
.profile-subscribe-btn:hover { box-shadow: 0 0 20px rgba(255,0,85,0.4); transform: scale(1.03); }
.profile-subscribe-btn.subscribed {
    background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.15); color: var(--text-muted);
}
.profile-subscriber-count { font-size: 0.78rem; color: var(--text-muted); font-weight: 600; }

/* Header action buttons */
.profile-header-actions {
    display: flex; gap: 6px; padding-bottom: 10px; margin-left: auto; flex-shrink: 0; flex-wrap: wrap;
}
.profile-header-actions button {
    padding: 8px 18px; border-radius: 20px; font-family: var(--font-body);
    font-weight: 700; font-size: 0.75rem; cursor: pointer; transition: all 0.3s;
    letter-spacing: 0.5px;
}
.profile-btn-edit { background: transparent; border: 1px solid rgba(255,255,255,0.2); color: #fff; }
.profile-btn-edit:hover { border-color: var(--primary); color: var(--primary); }
.profile-btn-follow { background: linear-gradient(135deg, var(--primary), #0088ff); color: #fff; border: none; }
.profile-btn-follow:hover { box-shadow: 0 0 20px rgba(0,243,255,0.4); }
.profile-btn-follow.following { background: transparent; border: 1px solid rgba(255,255,255,0.15); color: var(--text-muted); }
.profile-btn-msg { background: transparent; border: 1px solid rgba(255,255,255,0.15); color: #fff; }
.profile-btn-msg:hover { border-color: var(--primary); color: var(--primary); }
.profile-btn-share { background: transparent; border: 1px solid rgba(255,255,255,0.1); color: var(--text-muted); padding: 8px 12px; }
.profile-btn-share:hover { border-color: var(--accent); color: var(--accent); }
.profile-btn-back { background: transparent; border: 1px solid rgba(255,255,255,0.1); color: var(--text-muted); }
.profile-btn-back:hover { border-color: rgba(255,255,255,0.3); color: #fff; }
.btn-friend-add { background: linear-gradient(135deg, var(--primary), #0088ff); color: #fff; border: none; }
.btn-friend-add:hover { box-shadow: 0 0 25px rgba(0,243,255,0.3); }
.btn-friend-pending { background: rgba(255,215,0,0.1); border: 1px solid rgba(255,215,0,0.3); color: var(--accent); }
.btn-friend-remove { background: rgba(255,0,85,0.1); border: 1px solid rgba(255,0,85,0.3); color: var(--secondary); }
.btn-friend-remove:hover { background: rgba(255,0,85,0.2); }

/* Stats bar */
.profile-stats-bar {
    display: flex; gap: 0; padding: 0; margin-top: 16px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    border-top: 1px solid rgba(255,255,255,0.06);
    overflow-x: auto; scrollbar-width: none;
}
.profile-stats-bar::-webkit-scrollbar { display: none; }
.profile-stat {
    text-align: center; cursor: pointer; transition: all 0.3s;
    padding: 14px 20px; position: relative; white-space: nowrap; flex-shrink: 0;
}
.profile-stat:hover { background: rgba(255,255,255,0.03); }
.profile-stat-num { font-size: 1.15rem; font-weight: 800; color: #fff; }
.profile-stat-label { font-size: 0.65rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1.5px; margin-top: 2px; }

/* Level/XP bar */
.profile-level-bar {
    display: flex; align-items: center; gap: 12px; padding: 10px 24px;
    background: rgba(255,255,255,0.02); border-bottom: 1px solid rgba(255,255,255,0.04);
}
.profile-level-badge {
    display: flex; align-items: center; gap: 6px; padding: 4px 14px;
    background: linear-gradient(135deg, rgba(255,215,0,0.15), rgba(255,215,0,0.05));
    border: 1px solid rgba(255,215,0,0.25); border-radius: 14px;
    color: var(--accent); font-size: 0.72rem; font-weight: 800; letter-spacing: 1px;
    white-space: nowrap;
}
.profile-level-badge i { font-size: 0.7rem; }
.profile-xp-track {
    flex: 1; height: 6px; background: rgba(255,255,255,0.06); border-radius: 3px;
    overflow: hidden; position: relative;
}
.profile-xp-fill {
    height: 100%; border-radius: 3px; transition: width 1s var(--ease);
    background: linear-gradient(90deg, var(--accent), #ff9100);
}
.profile-xp-text { font-size: 0.65rem; color: var(--text-muted); white-space: nowrap; }

/* Profile tabs */
.profile-tabs {
    display: flex; border-bottom: 1px solid rgba(255,255,255,0.06);
    position: sticky; top: 70px; z-index: 5;
    background: rgba(2,2,8,0.95); backdrop-filter: blur(20px);
    overflow-x: auto; scrollbar-width: none;
}
.profile-tabs::-webkit-scrollbar { display: none; }
.profile-tab-btn {
    flex: 1; min-width: 80px; padding: 12px 6px; background: transparent; border: none;
    border-bottom: 2px solid transparent; color: var(--text-muted);
    font-family: var(--font-body); font-size: 0.7rem; font-weight: 700;
    letter-spacing: 1.5px; cursor: pointer; transition: all 0.3s;
    display: flex; align-items: center; justify-content: center; gap: 6px;
    white-space: nowrap;
}
.profile-tab-btn:hover { color: rgba(255,255,255,0.7); background: rgba(255,255,255,0.02); }
.profile-tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); background: rgba(0,243,255,0.04); }

/* Tab content areas */
.profile-tab-content { display: none; padding: 20px 24px; max-width: 680px; margin: 0 auto; }
.profile-tab-content.active { display: block; }
.profile-tab-content-wide { display: none; padding: 20px 24px; }
.profile-tab-content-wide.active { display: block; }

/* Profile cards */
.profile-card {
    background: rgba(8,12,30,0.7); border: 1px solid rgba(255,255,255,0.06);
    border-radius: 16px; padding: 20px; margin-bottom: 16px;
    backdrop-filter: blur(10px); transition: all 0.3s;
}
.profile-card:hover { border-color: rgba(0,243,255,0.12); }
.profile-card h4 { color: #fff; font-size: 0.9rem; margin-bottom: 14px; letter-spacing: 1px; }

/* Post creation */
.post-create-box { display: flex; gap: 12px; align-items: flex-start; }
.post-create-box textarea {
    flex: 1; background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08);
    border-radius: 14px; padding: 14px 18px; color: #fff; font-family: var(--font-body);
    font-size: 0.88rem; resize: none; min-height: 80px; outline: none; transition: all 0.3s;
}
.post-create-box textarea:focus { border-color: var(--primary); box-shadow: 0 0 20px rgba(0,243,255,0.08); }
.post-create-box textarea::placeholder { color: rgba(255,255,255,0.2); }
.post-actions { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; padding-top: 12px; border-top: 1px solid rgba(255,255,255,0.04); }
.post-media-btn {
    background: none; border: 1px solid rgba(255,255,255,0.08); color: var(--text-muted);
    padding: 8px 14px; border-radius: 20px; cursor: pointer; font-size: 0.78rem; transition: all 0.3s;
}
.post-media-btn:hover { border-color: var(--primary); color: var(--primary); }
.post-submit-btn {
    background: linear-gradient(135deg, var(--primary), #0088ff); color: #fff; border: none;
    padding: 8px 24px; border-radius: 20px; font-weight: 700; cursor: pointer; font-family: var(--font-body);
    font-size: 0.78rem; transition: all 0.3s; letter-spacing: 0.5px;
}
.post-submit-btn:hover { box-shadow: 0 0 25px rgba(0,243,255,0.3); transform: translateY(-1px); }

/* Post items */
.post-item {
    background: rgba(8,12,30,0.7); border: 1px solid rgba(255,255,255,0.06);
    border-radius: 16px; padding: 18px; margin-bottom: 12px;
    backdrop-filter: blur(10px); transition: all 0.3s;
}
.post-item:hover { border-color: rgba(0,243,255,0.1); }
.post-header { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.post-avatar {
    width: 42px; height: 42px; border-radius: 50%; overflow: hidden; flex-shrink: 0;
    background: linear-gradient(135deg, var(--primary), #0088ff); display: flex;
    align-items: center; justify-content: center; font-weight: 700; font-size: 0.85rem;
    color: #fff; cursor: pointer; transition: all 0.3s;
}
.post-avatar:hover { box-shadow: 0 0 15px rgba(0,243,255,0.3); }
.post-avatar img { width: 100%; height: 100%; object-fit: cover; }
.post-name { font-weight: 700; color: #fff; font-size: 0.88rem; cursor: pointer; }
.post-name:hover { color: var(--primary); }
.post-time { color: var(--text-muted); font-size: 0.68rem; }
.post-content { color: rgba(255,255,255,0.9); font-size: 0.88rem; line-height: 1.7; margin-bottom: 10px; white-space: pre-wrap; word-break: break-word; }
.post-media { border-radius: 14px; overflow: hidden; margin-bottom: 10px; }
.post-media img, .post-media video { width: 100%; max-height: 500px; object-fit: cover; border-radius: 14px; cursor: pointer; transition: all 0.3s; }
.post-media img:hover { opacity: 0.95; }
.post-footer {
    display: flex; align-items: center; gap: 4px; padding-top: 10px;
    border-top: 1px solid rgba(255,255,255,0.05);
}
.post-like-btn, .post-comment-btn, .post-share-btn, .post-bookmark-btn, .post-repost-btn {
    background: none; border: none; color: var(--text-muted); cursor: pointer;
    font-size: 0.8rem; display: flex; align-items: center; gap: 5px; transition: all 0.3s;
    font-family: var(--font-body); padding: 7px 10px; border-radius: 18px;
}
.post-like-btn:hover { color: var(--secondary); background: rgba(255,0,85,0.08); }
.post-like-btn.liked { color: var(--secondary); }
.post-like-btn.liked i { animation: cosmicPulse 0.5s ease; }
.post-comment-btn:hover { color: var(--primary); background: rgba(0,243,255,0.08); }
.post-repost-btn:hover { color: #00e676; background: rgba(0,230,118,0.08); }
.post-share-btn:hover { color: var(--accent); background: rgba(255,215,0,0.08); }
.post-bookmark-btn:hover { color: var(--primary); background: rgba(0,243,255,0.08); }
.post-bookmark-btn.saved { color: var(--accent); }
.post-delete-btn { background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 0.75rem; margin-left: auto; transition: all 0.3s; padding: 7px; border-radius: 50%; }
.post-delete-btn:hover { color: var(--secondary); background: rgba(255,0,85,0.1); }
.post-view-count { margin-left: auto; font-size: 0.68rem; color: var(--text-muted); display: flex; align-items: center; gap: 4px; }

/* Gallery tab */
.profile-gallery-grid {
    display: grid; grid-template-columns: repeat(3, 1fr);
    gap: 3px; max-width: 100%;
}
.profile-gallery-item {
    position: relative; aspect-ratio: 1; overflow: hidden;
    cursor: pointer; background: rgba(255,255,255,0.03);
}
.profile-gallery-item img, .profile-gallery-item video { width: 100%; height: 100%; object-fit: cover; transition: all 0.3s; }
.profile-gallery-item:hover img, .profile-gallery-item:hover video { transform: scale(1.05); opacity: 0.85; }
.profile-gallery-overlay {
    position: absolute; inset: 0; background: rgba(0,0,0,0.45);
    display: none; align-items: center; justify-content: center;
    gap: 14px; color: #fff; font-weight: 700; font-size: 0.85rem;
}
.profile-gallery-item:hover .profile-gallery-overlay { display: flex; }
.profile-gallery-overlay span { display: flex; align-items: center; gap: 5px; }
.profile-gallery-empty { grid-column: 1 / -1; text-align: center; padding: 60px 20px; color: var(--text-muted); }
.profile-gallery-empty i { font-size: 3rem; opacity: 0.2; display: block; margin-bottom: 14px; }

/* Milestone roadmap */
.milestone-road { padding: 0 10px; }
.milestone-item {
    display: flex; align-items: flex-start; gap: 16px; padding: 16px 0;
    border-left: 2px solid rgba(255,255,255,0.06); margin-left: 16px;
    padding-left: 24px; position: relative; transition: all 0.3s;
}
.milestone-item::before {
    content: ''; position: absolute; left: -8px; top: 20px;
    width: 14px; height: 14px; border-radius: 50%;
    background: rgba(255,255,255,0.1); border: 2px solid rgba(255,255,255,0.15);
    transition: all 0.3s;
}
.milestone-item.reached { border-left-color: var(--primary); }
.milestone-item.reached::before { background: var(--primary); border-color: var(--primary); box-shadow: 0 0 10px rgba(0,243,255,0.5); }
.milestone-item.current { border-left-color: var(--accent); }
.milestone-item.current::before { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 12px rgba(255,215,0,0.6); animation: milestonePulse 2s infinite; }
@keyframes milestonePulse { 0%,100% { box-shadow: 0 0 8px rgba(255,215,0,0.4); } 50% { box-shadow: 0 0 20px rgba(255,215,0,0.8); } }
.milestone-icon {
    width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center;
    justify-content: center; font-size: 1.1rem; flex-shrink: 0;
    background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08);
    transition: all 0.3s;
}
.milestone-item.reached .milestone-icon { background: rgba(0,243,255,0.1); border-color: rgba(0,243,255,0.3); }
.milestone-info { flex: 1; }
.milestone-title { font-size: 0.85rem; font-weight: 700; color: #fff; margin-bottom: 2px; }
.milestone-item.reached .milestone-title { color: var(--primary); }
.milestone-desc { font-size: 0.72rem; color: var(--text-muted); line-height: 1.4; }
.milestone-reward {
    display: inline-flex; align-items: center; gap: 4px; margin-top: 4px;
    padding: 2px 10px; border-radius: 10px; font-size: 0.65rem; font-weight: 700;
    background: rgba(255,215,0,0.08); border: 1px solid rgba(255,215,0,0.15);
    color: var(--accent);
}
.milestone-progress-mini {
    margin-top: 6px; height: 4px; background: rgba(255,255,255,0.06);
    border-radius: 2px; overflow: hidden; max-width: 200px;
}
.milestone-progress-mini-fill { height: 100%; border-radius: 2px; background: linear-gradient(90deg, var(--primary), var(--accent)); transition: width 1s; }

/* Achievement badges */
.achievement-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.achievement-badge {
    display: flex; flex-direction: column; align-items: center; gap: 6px;
    padding: 14px 10px; border-radius: 14px;
    background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.06);
    width: 90px; text-align: center; transition: all 0.3s; cursor: default;
}
.achievement-badge:hover { border-color: rgba(0,243,255,0.2); transform: translateY(-2px); }
.achievement-badge.locked { opacity: 0.4; filter: grayscale(1); }
.achievement-badge-icon { font-size: 1.5rem; }
.achievement-badge-name { font-size: 0.6rem; color: var(--text-muted); font-weight: 600; letter-spacing: 0.5px; }
.achievement-badge.earned .achievement-badge-name { color: var(--accent); }

/* About tab */
.profile-about-container { max-width: 680px; margin: 0 auto; }
.profile-about-card {
    background: rgba(8,12,30,0.7); border: 1px solid rgba(255,255,255,0.06);
    border-radius: 16px; padding: 20px; margin-bottom: 14px;
    backdrop-filter: blur(10px); transition: all 0.3s;
}
.profile-about-card:hover { border-color: rgba(0,243,255,0.12); }
.profile-about-card h4 {
    color: var(--primary); font-size: 0.78rem; font-weight: 700; letter-spacing: 2px;
    text-transform: uppercase; margin-bottom: 14px; display: flex; align-items: center; gap: 8px;
}
.profile-info-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid rgba(255,255,255,0.04); }
.profile-info-row:last-child { border-bottom: none; }
.profile-info-row i { color: var(--primary); width: 20px; text-align: center; font-size: 0.85rem; opacity: 0.8; }
.profile-info-row .info-label { color: var(--text-muted); font-size: 0.78rem; flex: 1; }
.profile-info-row .info-value { color: #fff; font-size: 0.82rem; font-weight: 600; }
.profile-detail-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.profile-detail-badge {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 6px 14px; border-radius: 18px;
    background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.8); font-size: 0.75rem; transition: all 0.3s;
}
.profile-detail-badge i { color: var(--primary); font-size: 0.72rem; }
.profile-detail-badge:hover { border-color: rgba(0,243,255,0.2); background: rgba(0,243,255,0.05); }
.profile-edit-btn {
    width: 100%; padding: 10px; border: 1px solid rgba(0,243,255,0.3); background: transparent;
    color: var(--primary); border-radius: 10px; cursor: pointer; font-family: var(--font-body);
    font-weight: 600; font-size: 0.82rem; transition: all 0.3s; margin-top: 8px;
}
.profile-edit-btn:hover { background: rgba(0,243,255,0.1); }

/* Highlights / Stories (Instagram) */
.profile-highlights {
    display: flex; gap: 14px; padding: 14px 24px; overflow-x: auto; scrollbar-width: none;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}
.profile-highlights::-webkit-scrollbar { display: none; }
.profile-highlight-item { display: flex; flex-direction: column; align-items: center; gap: 6px; cursor: pointer; flex-shrink: 0; }
.profile-highlight-ring {
    width: 64px; height: 64px; border-radius: 50%; padding: 3px;
    background: linear-gradient(135deg, var(--primary), var(--secondary), var(--accent));
}
.profile-highlight-ring.empty { background: rgba(255,255,255,0.1); }
.profile-highlight-inner {
    width: 100%; height: 100%; border-radius: 50%; background: var(--dark-bg);
    display: flex; align-items: center; justify-content: center; overflow: hidden;
    border: 2px solid var(--dark-bg);
}
.profile-highlight-inner i { font-size: 1.2rem; color: var(--text-muted); }
.profile-highlight-inner img { width: 100%; height: 100%; object-fit: cover; }
.profile-highlight-label { font-size: 0.6rem; color: var(--text-muted); max-width: 64px; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Friends tab */
.friends-page { display: none; min-height: 100vh; padding-top: 100px; }
.friends-page.active { display: block; }
.friends-container { max-width: 680px; margin: 0 auto; padding: 0; }
.friends-search-box { display: flex; gap: 8px; margin-bottom: 16px; }
.friends-search-box input {
    flex: 1; padding: 10px 16px; border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.08); background: rgba(255,255,255,0.04);
    color: #fff; font-size: 0.85rem; font-family: var(--font-body); outline: none;
}
.friends-search-box input:focus { border-color: var(--primary); box-shadow: 0 0 20px rgba(0,243,255,0.08); }
.friends-search-box button {
    padding: 10px 18px; border-radius: 20px; background: linear-gradient(135deg, var(--primary), #0088ff);
    color: #fff; border: none; font-weight: 700; cursor: pointer; font-family: var(--font-body); transition: all 0.3s; font-size: 0.8rem;
}
.friends-search-box button:hover { box-shadow: 0 0 20px rgba(0,243,255,0.3); }
.friends-tabs { display: flex; gap: 5px; margin-bottom: 14px; flex-wrap: wrap; }
.friends-tab {
    padding: 7px 14px; border-radius: 18px; cursor: pointer; font-size: 0.75rem;
    font-weight: 600; transition: all 0.3s; border: 1px solid rgba(255,255,255,0.08);
    background: transparent; color: var(--text-muted); font-family: var(--font-body);
}
.friends-tab.active { border-color: var(--primary); color: var(--primary); background: rgba(0,243,255,0.08); }
.friends-tab .tab-badge { background: var(--secondary); color: #fff; padding: 1px 6px; border-radius: 10px; font-size: 0.6rem; margin-left: 4px; }
.friend-card {
    display: flex; align-items: center; gap: 12px; padding: 12px 14px;
    background: rgba(8,12,30,0.7); border: 1px solid rgba(255,255,255,0.06);
    border-radius: 14px; margin-bottom: 8px; transition: all 0.3s; backdrop-filter: blur(10px);
}
.friend-card:hover { border-color: rgba(0,243,255,0.15); background: rgba(0,243,255,0.03); }
.friend-card-avatar { width: 48px; height: 48px; border-radius: 50%; overflow: hidden; flex-shrink: 0; background: linear-gradient(135deg, var(--primary), #0088ff); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 1rem; color: #fff; cursor: pointer; }
.friend-card-avatar img { width: 100%; height: 100%; object-fit: cover; }
.friend-card-info { flex: 1; min-width: 0; }
.friend-card-name { font-weight: 600; color: #fff; cursor: pointer; font-size: 0.88rem; }
.friend-card-name:hover { color: var(--primary); }
.friend-card-uid { color: var(--text-muted); font-size: 0.68rem; letter-spacing: 1px; }
.friend-card-location { color: var(--text-muted); font-size: 0.72rem; margin-top: 1px; }
.friend-card-actions { display: flex; gap: 6px; flex-shrink: 0; }
.friend-card-actions button {
    padding: 7px 14px; border-radius: 18px; font-size: 0.72rem; font-weight: 600;
    cursor: pointer; transition: all 0.3s; font-family: var(--font-body);
}

/* Suggested / Recommended users */
.suggested-users { display: flex; gap: 12px; overflow-x: auto; padding: 4px 0 10px; scrollbar-width: none; }
.suggested-users::-webkit-scrollbar { display: none; }
.suggested-user-card {
    flex-shrink: 0; width: 140px; padding: 16px 10px; border-radius: 14px;
    background: rgba(8,12,30,0.7); border: 1px solid rgba(255,255,255,0.06);
    text-align: center; transition: all 0.3s; cursor: pointer;
}
.suggested-user-card:hover { border-color: rgba(0,243,255,0.2); transform: translateY(-2px); }
.suggested-user-avatar {
    width: 56px; height: 56px; border-radius: 50%; margin: 0 auto 8px;
    background: linear-gradient(135deg, var(--primary), #0088ff);
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; color: #fff; font-size: 1.1rem; overflow: hidden;
}
.suggested-user-avatar img { width: 100%; height: 100%; object-fit: cover; }
.suggested-user-name { font-size: 0.75rem; font-weight: 600; color: #fff; margin-bottom: 8px; }
.suggested-user-btn {
    padding: 5px 14px; border-radius: 14px; font-size: 0.65rem; font-weight: 700;
    background: linear-gradient(135deg, var(--primary), #0088ff); color: #fff; border: none;
    cursor: pointer; transition: all 0.3s;
}
.suggested-user-btn:hover { box-shadow: 0 0 12px rgba(0,243,255,0.3); }

/* Activity feed */
.activity-item {
    display: flex; align-items: center; gap: 10px; padding: 10px 0;
    border-bottom: 1px solid rgba(255,255,255,0.04); font-size: 0.78rem;
}
.activity-item:last-child { border-bottom: none; }
.activity-icon {
    width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center;
    justify-content: center; font-size: 0.72rem; flex-shrink: 0;
}
.activity-text { color: rgba(255,255,255,0.75); flex: 1; }
.activity-text strong { color: #fff; }
.activity-time { color: var(--text-muted); font-size: 0.65rem; flex-shrink: 0; }

/* Profile Responsive */
@media (max-width: 768px) {
    .profile-header-info { flex-direction: column; align-items: center; text-align: center; margin-top: -60px; padding: 0 14px; gap: 14px; }
    .profile-avatar-large { width: 110px; height: 110px; font-size: 2.5rem; }
    .profile-header-text h2 { justify-content: center; font-size: 1.4rem; }
    .profile-header-text .profile-bio-text { max-width: 100%; }
    .profile-header-meta { justify-content: center; }
    .profile-subscribe-bar { justify-content: center; }
    .profile-header-actions { margin-left: 0; justify-content: center; padding-bottom: 0; }
    .profile-stats-bar { justify-content: flex-start; padding: 0; }
    .profile-stat { padding: 12px 14px; }
    .profile-cover { height: 200px; }
    .profile-tab-content, .profile-tab-content-wide { padding: 14px 10px; }
    .profile-tabs { top: 60px; }
    .profile-tab-btn { font-size: 0.62rem; letter-spacing: 1px; padding: 10px 4px; }
    .profile-gallery-grid { gap: 2px; }
    .profile-highlights { padding: 10px 14px; gap: 10px; }
    .profile-highlight-ring { width: 54px; height: 54px; }
    .profile-level-bar { padding: 8px 14px; }
    .milestone-item { padding-left: 16px; margin-left: 12px; }
    .achievement-badge { width: 75px; padding: 10px 6px; }
    .signup-progress { gap: 0; }
    .signup-step-dot { width: 28px; height: 28px; font-size: 0.65rem; }
    .signup-step-line { width: 20px; }
    .auth-row { flex-direction: column; gap: 0; }
    .auth-check-row { flex-wrap: wrap; }
}
@media (max-width: 480px) {
    .profile-avatar-large { width: 88px; height: 88px; font-size: 1.8rem; border-width: 3px; }
    .profile-cover { height: 160px; }
    .profile-stat { padding: 8px 10px; }
    .profile-stat-num { font-size: 1rem; }
    .profile-stat-label { font-size: 0.55rem; }
    .profile-gallery-grid { gap: 1px; }
    .profile-highlight-ring { width: 48px; height: 48px; }
    .profile-header-actions button { padding: 6px 12px; font-size: 0.68rem; }
    .milestone-icon { width: 36px; height: 36px; font-size: 0.9rem; }
}

.auth-modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.7); z-index: 10000;
    display: flex; align-items: center; justify-content: center;
    opacity: 0; visibility: hidden; transition: all 0.3s;
    backdrop-filter: blur(6px);
}
.auth-modal-overlay.open { opacity: 1; visibility: visible; }
.auth-modal {
    width: 480px; max-width: 94vw; max-height: 90vh; overflow-y: auto;
    background: linear-gradient(180deg, rgba(10,10,30,0.98), rgba(2,2,10,0.99));
    border: 1px solid rgba(0,243,255,0.2); border-radius: 16px;
    padding: 36px 32px; position: relative;
    box-shadow: 0 20px 60px rgba(0,0,0,0.6), 0 0 40px rgba(0,243,255,0.05);
    transform: scale(0.9) translateY(20px); transition: transform 0.4s var(--ease);
}
.auth-modal-overlay.open .auth-modal { transform: scale(1) translateY(0); }
.auth-modal-close {
    position: absolute; top: 16px; right: 16px;
    background: none; border: 1px solid rgba(255,255,255,0.12); color: #fff;
    width: 32px; height: 32px; border-radius: 50%; cursor: pointer;
    font-size: 0.9rem; transition: all 0.3s;
    display: flex; align-items: center; justify-content: center;
}
.auth-modal-close:hover { border-color: var(--secondary); color: var(--secondary); }
.auth-modal h2 {
    font-family: var(--font-title); color: var(--primary); font-size: 1.4rem;
    margin: 0 0 6px 0; text-shadow: 0 0 10px rgba(0,243,255,0.2);
}
.auth-modal .auth-subtitle {
    color: var(--text-muted); font-size: 0.85rem; margin-bottom: 24px;
}
.settings-panel {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.settings-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 18px;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.03);
}
.settings-card-info {
    flex: 1;
    min-width: 0;
}
.settings-card-title {
    color: #fff;
    font-size: 0.92rem;
    letter-spacing: 0.6px;
    font-weight: 700;
    margin-bottom: 4px;
}
.settings-card-desc {
    color: var(--text-muted);
    font-size: 0.74rem;
    line-height: 1.6;
}
.settings-card-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: rgba(0,243,255,0.08);
    color: var(--primary);
    border: 1px solid rgba(0,243,255,0.18);
    font-size: 1rem;
}
.settings-card.danger {
    border-color: rgba(255,0,85,0.2);
    background: rgba(255,0,85,0.05);
}
.settings-card.danger .settings-card-icon {
    background: rgba(255,0,85,0.1);
    border-color: rgba(255,0,85,0.18);
    color: var(--secondary);
}
.settings-action-btn {
    border: 1px solid rgba(0,243,255,0.2);
    background: rgba(0,243,255,0.08);
    color: var(--primary);
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.8px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.25s ease;
    font-family: var(--font-body);
}
.settings-action-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(0,243,255,0.12);
    border-color: rgba(0,243,255,0.35);
}
.settings-action-btn.danger {
    border-color: rgba(255,0,85,0.25);
    background: rgba(255,0,85,0.12);
    color: #ff8ab3;
}
.settings-action-btn.danger:hover {
    box-shadow: 0 10px 24px rgba(255,0,85,0.12);
    border-color: rgba(255,0,85,0.35);
}
.settings-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.66rem;
    color: var(--accent);
    background: rgba(255,215,0,0.08);
    border: 1px solid rgba(255,215,0,0.12);
    letter-spacing: 0.5px;
}
.settings-detail-shell {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.settings-summary-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}
.settings-summary-box {
    padding: 14px;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.03);
}
.settings-summary-label {
    color: var(--text-muted);
    font-size: 0.68rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 8px;
}
.settings-summary-value {
    color: #fff;
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.3;
}
.settings-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.settings-user-row,
.settings-order-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.03);
}
.settings-user-main {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    flex: 1;
}
.settings-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,243,255,0.12);
    color: var(--primary);
    border: 1px solid rgba(0,243,255,0.2);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 1px;
}
.settings-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.settings-user-name,
.settings-order-items {
    color: #fff;
    font-size: 0.85rem;
    font-weight: 700;
    line-height: 1.45;
}
.settings-user-meta,
.settings-order-meta {
    color: var(--text-muted);
    font-size: 0.72rem;
    line-height: 1.5;
    margin-top: 3px;
}
.settings-inline-note {
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid rgba(255,215,0,0.14);
    background: rgba(255,215,0,0.06);
    color: var(--text-muted);
    font-size: 0.74rem;
    line-height: 1.7;
}
.settings-empty {
    padding: 28px 18px;
    border-radius: 14px;
    border: 1px dashed rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.02);
    text-align: center;
    color: var(--text-muted);
    font-size: 0.78rem;
    line-height: 1.7;
}
.settings-empty i {
    display: block;
    font-size: 1.5rem;
    color: var(--primary);
    opacity: 0.55;
    margin-bottom: 10px;
}
.settings-modal-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 4px;
}
.settings-secondary-btn {
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.04);
    color: #fff;
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.8px;
    cursor: pointer;
    transition: all 0.25s ease;
    font-family: var(--font-body);
}
.settings-secondary-btn:hover {
    transform: translateY(-1px);
    border-color: rgba(255,255,255,0.2);
    box-shadow: 0 10px 24px rgba(0,0,0,0.18);
}
.settings-loading {
    color: var(--text-muted);
    font-size: 0.78rem;
    text-align: center;
    padding: 24px 10px;
}
.settings-loading i {
    margin-right: 8px;
    color: var(--primary);
}
@media (max-width: 575.98px) {
    .settings-card,
    .settings-user-row,
    .settings-order-card {
        flex-direction: column;
        align-items: flex-start;
    }
    .settings-action-btn,
    .settings-secondary-btn,
    .auth-submit-btn {
        width: 100%;
    }
    .settings-summary-grid {
        grid-template-columns: 1fr;
    }
    .settings-modal-actions {
        flex-direction: column;
    }
}
.auth-field {
    margin-bottom: 16px;
}
.auth-field label {
    display: block; color: var(--text-muted); font-size: 0.8rem;
    text-transform: uppercase; letter-spacing: 1.5px; margin-bottom: 6px;
}
.auth-field input {
    width: 100%; padding: 12px 16px; border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.1); background: rgba(255,255,255,0.04);
    color: #fff; font-size: 0.95rem; font-family: var(--font-body);
    outline: none; transition: all 0.3s;
}
.auth-field input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(0,243,255,0.1), 0 0 15px rgba(0,243,255,0.1);
}
.auth-field input::placeholder { color: rgba(255,255,255,0.2); }
.auth-submit-btn {
    width: 100%; padding: 14px; border: none; border-radius: 8px;
    background: linear-gradient(135deg, var(--primary), #0088ff);
    color: #fff; font-weight: 700; font-size: 1rem; text-transform: uppercase;
    letter-spacing: 2px; cursor: pointer; transition: all 0.3s;
    font-family: var(--font-body); margin-top: 8px;
}
.auth-submit-btn:hover { box-shadow: 0 0 30px rgba(0,243,255,0.3); transform: translateY(-2px); }
.google-signin-btn {
    width: 100%; padding: 14px 20px; border: none; border-radius: 12px;
    background: #ffffff; color: #3c4043; font-weight: 600; font-size: 0.95rem;
    cursor: pointer; transition: all 0.3s; font-family: var(--font-body);
    display: flex; align-items: center; justify-content: center; gap: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.google-signin-btn:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.25); transform: translateY(-2px);
    background: #f8f9fa;
}
.google-signin-btn:active { transform: translateY(0); }
.google-signin-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.auth-divider {
    display: flex; align-items: center; gap: 12px; margin: 18px 0;
    color: var(--text-muted); font-size: 0.8rem;
}
.auth-divider::before, .auth-divider::after {
    content: ''; flex: 1; height: 1px;
    background: rgba(255,255,255,0.1);
}
/* Signup Wizard Steps */
.signup-steps {
    display: flex; justify-content: center; gap: 8px; margin-bottom: 24px;
}
.signup-step-dot {
    width: 32px; height: 32px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.75rem; font-weight: 700; color: rgba(255,255,255,0.3);
    border: 2px solid rgba(255,255,255,0.1);
    transition: all 0.3s;
}
.signup-step-dot.active {
    border-color: var(--primary); color: var(--primary);
    box-shadow: 0 0 12px rgba(0,243,255,0.2);
}
.signup-step-dot.done {
    border-color: #34A853; color: #34A853; background: rgba(52,168,83,0.1);
}
.signup-step-connector {
    width: 24px; height: 2px; background: rgba(255,255,255,0.1);
    align-self: center; transition: background 0.3s;
}
.signup-step-connector.done { background: #34A853; }
.signup-step-panel { display: none; }
.signup-step-panel.active { display: block; }
.signup-google-info {
    display: flex; align-items: center; gap: 12px; padding: 14px;
    background: rgba(52,168,83,0.08); border: 1px solid rgba(52,168,83,0.25);
    border-radius: 10px; margin-bottom: 16px;
}
.signup-google-info img {
    width: 42px; height: 42px; border-radius: 50%; border: 2px solid rgba(52,168,83,0.4);
}
.signup-google-info .info-name { color: #fff; font-weight: 600; font-size: 0.9rem; }
.signup-google-info .info-email { color: var(--text-muted); font-size: 0.78rem; }
.signup-google-info .info-check { color: #34A853; margin-left: auto; font-size: 1.2rem; }
.auth-input {
    width: 100%; padding: 12px 14px; border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.04); color: #fff;
    font-size: 0.95rem; font-family: var(--font-body);
    outline: none; transition: border 0.3s; margin-bottom: 12px;
}
.auth-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 12px rgba(0,243,255,0.15);
}
.auth-input::placeholder { color: rgba(255,255,255,0.25); }
.auth-input:read-only { opacity: 0.6; cursor: not-allowed; }
.password-wrap {
    position: relative; width: 100%; margin-bottom: 12px;
}
.password-wrap .auth-input { margin-bottom: 0; padding-right: 44px; }
.password-toggle {
    position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
    background: none; border: none; color: var(--text-muted);
    cursor: pointer; font-size: 1.1rem; padding: 4px;
    transition: color 0.3s; z-index: 2;
}
.password-toggle:hover { color: var(--primary); }
.auth-input-label {
    font-size: 0.78rem; color: var(--text-muted); margin-bottom: 6px;
    display: block;
}
.auth-next-btn {
    width: 100%; padding: 13px; border: none; border-radius: 8px;
    background: linear-gradient(135deg, var(--primary), #0088ff);
    color: #fff; font-weight: 700; font-size: 0.9rem;
    cursor: pointer; transition: all 0.3s; font-family: var(--font-body);
    letter-spacing: 1px; margin-top: 4px;
}
.auth-next-btn:hover { box-shadow: 0 0 20px rgba(0,243,255,0.3); transform: translateY(-1px); }
.auth-next-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }
.auth-back-link {
    display: inline-block; margin-top: 12px; font-size: 0.8rem;
    color: var(--text-muted); cursor: pointer;
}
.auth-back-link:hover { color: var(--primary); }

.password-strength {
    height: 3px; border-radius: 2px; margin-top: -8px; margin-bottom: 12px;
    background: rgba(255,255,255,0.05); overflow: hidden;
}
.password-strength-bar {
    height: 100%; width: 0; border-radius: 2px; transition: all 0.3s;
}
.auth-switch {
    text-align: center; margin-top: 18px; color: var(--text-muted); font-size: 0.85rem;
}
.auth-switch a {
    color: var(--primary); cursor: pointer; text-decoration: none; font-weight: 600;
}
.auth-switch a:hover { text-decoration: underline; }
.auth-error {
    background: rgba(255,0,85,0.1); border: 1px solid rgba(255,0,85,0.3);
    color: var(--secondary); padding: 10px 14px; border-radius: 8px;
    font-size: 0.85rem; margin-bottom: 14px; display: none;
}
.auth-name-row { display: flex; gap: 12px; }
.auth-name-row .auth-field { flex: 1; }
.profile-logged-in { text-align: center; }
.profile-logged-in .profile-avatar {
    width: 50px; height: 50px; border-radius: 50%; margin: 0 auto 10px;
    background: linear-gradient(135deg, var(--primary), #0088ff);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.3rem; font-weight: 700; color: #fff;
    font-family: var(--font-title);
}
.profile-logged-in .profile-name {
    color: #fff; font-weight: 600; font-size: 0.95rem; margin-bottom: 2px;
}
.profile-logged-in .profile-email {
    color: var(--text-muted); font-size: 0.75rem; margin-bottom: 14px;
    word-break: break-all;
}
.auth-logout-btn {
    width: 100%; padding: 10px; border: 1px solid rgba(255,0,85,0.3);
    background: transparent; border-radius: 8px;
    color: var(--secondary); font-weight: 600; font-size: 0.85rem;
    cursor: pointer; transition: all 0.3s; font-family: var(--font-body);
}
.auth-logout-btn:hover { background: rgba(255,0,85,0.1); border-color: var(--secondary); }
@media (max-width: 768px) {
    .profile-dropdown { right: -10px; width: 200px; }
    .auth-modal { padding: 28px 20px; }
    .auth-name-row { flex-direction: column; gap: 0; }
}

/* --- 3D MODEL VIEWER --- */
.model-viewer-container {
    width: 100%; aspect-ratio: 1 / 1;
    background: radial-gradient(ellipse at center, rgba(10,10,30,0.8) 0%, rgba(2,2,8,1) 100%);
    border: 1px solid rgba(0,243,255,0.3);
    position: relative;
    display: flex; justify-content: center; align-items: center;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: inset 0 0 50px rgba(0,243,255,0.05), 0 0 30px rgba(0,0,0,0.5);
}
.model-viewer-container::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url('data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 width=%22300%22 height=%22300%22><circle cx=%2250%22 cy=%2280%22 r=%221%22 fill=%22%2300f3ff%22 opacity=%220.4%22/><circle cx=%22200%22 cy=%2240%22 r=%220.5%22 fill=%22%23fff%22 opacity=%220.3%22/><circle cx=%22250%22 cy=%22200%22 r=%220.8%22 fill=%22%2300f3ff%22 opacity=%220.2%22/></svg>');
    pointer-events: none;
    animation: starTwinkle 4s ease-in-out infinite;
}
.model-viewer-container model-viewer {
    width: 100%; height: 100%;
    background: transparent;
    --poster-color: transparent;
    border-radius: 12px;
}
.model-upload-zone {
    display: flex; flex-direction: column;
    justify-content: center; align-items: center;
    width: 100%; height: 100%;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
}
.model-upload-zone:hover {
    background: rgba(0,243,255,0.03);
}
.model-upload-zone.drag-over {
    background: rgba(0,243,255,0.08);
    border: 2px dashed var(--primary);
    border-radius: 12px;
}
.model-upload-icon {
    font-size: 3rem;
    color: var(--primary);
    opacity: 0.5;
    margin-bottom: 16px;
    text-shadow: 0 0 20px rgba(0,243,255,0.4);
    transition: all 0.3s ease;
}
.model-upload-zone:hover .model-upload-icon {
    opacity: 0.8;
    transform: scale(1.1);
}
.model-upload-text {
    color: rgba(255,255,255,0.5);
    font-size: 0.85rem;
    letter-spacing: 2px;
    font-family: var(--font-body);
    text-align: center;
}
.model-upload-text span {
    display: block;
    font-size: 0.7rem;
    opacity: 0.5;
    margin-top: 6px;
}
.model-download-btn {
    position: absolute;
    bottom: 12px; right: 12px;
    z-index: 10;
    background: rgba(0,0,0,0.6);
    border: 1px solid rgba(0,243,255,0.3);
    color: var(--primary);
    width: 40px; height: 40px;
    border-radius: 50%;
    display: flex; justify-content: center; align-items: center;
    cursor: pointer;
    font-size: 0.95rem;
    backdrop-filter: blur(8px);
    transition: all 0.3s ease;
    opacity: 0.7;
}
.model-zoom-btn {
    position: absolute;
    bottom: 12px; left: 12px;
    z-index: 10;
    background: rgba(0,0,0,0.6);
    border: 1px solid rgba(0,243,255,0.3);
    color: var(--primary);
    width: 40px; height: 40px;
    border-radius: 50%;
    display: flex; justify-content: center; align-items: center;
    cursor: pointer;
    font-size: 0.95rem;
    backdrop-filter: blur(8px);
    transition: all 0.3s ease;
    opacity: 0.7;
}
.model-viewer-container:hover .model-download-btn,
.model-viewer-container:hover .model-zoom-btn {
    opacity: 1;
}
.model-download-btn:hover,
.model-zoom-btn:hover {
    background: rgba(0,243,255,0.15);
    border-color: var(--primary);
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(0,243,255,0.3);
}
.model-viewer-container.model-fullscreen {
    position: fixed !important;
    top: 0 !important; left: 0 !important;
    width: 100vw !important; height: 100vh !important;
    max-width: 100vw !important;
    max-height: 100vh !important;
    aspect-ratio: auto !important;
    z-index: 999999 !important;
    border-radius: 0 !important;
    border: none !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #000 !important;
    box-shadow: none !important;
    transform: none !important;
    filter: none !important;
    contain: none !important;
}
.model-viewer-container.model-fullscreen .model-download-btn,
.model-viewer-container.model-fullscreen .model-zoom-btn {
    opacity: 1;
    bottom: 24px;
}
.model-viewer-container.model-fullscreen .model-download-btn { right: 24px; }
.model-viewer-container.model-fullscreen .model-zoom-btn { left: 24px; }

.hologram-effect {
    width: 200px; height: 300px;
    background: linear-gradient(to bottom, transparent, rgba(0,243,255,0.15), rgba(255,0,85,0.05), transparent);
    animation: hologramScan 2s linear infinite;
    border-radius: 50%;
    filter: blur(2px);
    position: absolute;
    pointer-events: none;
}
@keyframes hologramScan { 0% { transform: translateY(-100%); } 100% { transform: translateY(100%); } }

/* --- FOOTER --- */
footer { 
    background: linear-gradient(180deg, rgba(2,2,8,0.95) 0%, rgba(0,0,3,1) 100%);
    border-top: 1px solid rgba(0,243,255,0.15); 
    padding: 24px 0 18px; 
    text-align: center;
    position: relative;
    overflow: hidden;
}
footer::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary), var(--secondary), var(--accent), transparent);
}
footer::after {
    content: '';
    position: absolute;
    top: 0; left: 50%; transform: translateX(-50%);
    width: 60%; height: 100%;
    background: radial-gradient(ellipse at top, rgba(0,243,255,0.05) 0%, transparent 70%);
    pointer-events: none;
}
.social-icons a { 
    color: rgba(255,255,255,0.7); margin: 0 10px; font-size: 1.2rem; 
    transition: all 0.3s; 
    position: relative;
}
.social-icons a:hover { 
    color: var(--primary); 
    text-shadow: 0 0 15px rgba(0,243,255,0.5);
    transform: translateY(-3px);
    display: inline-block;
}

/* --- RESPONSIVE --- */
/* Navbar icons always on top */
.navbar-icons {
    position: relative;
    z-index: 10;
    margin-left: auto;
    flex-shrink: 0;
    gap: 0.9rem !important;
}
.navbar-icons .nav-icon {
    font-size: 2rem !important;
}
/* Desktop: nav left, icons right — single row */
@media (min-width: 992px) {
    .navbar {
        --desktop-nav-icon-size: clamp(16px, calc(31.92px * var(--desktop-layout-scale, 1)), 31.92px);
        --desktop-menu-icon-size: clamp(14px, calc(28.5px * var(--desktop-layout-scale, 1)), 28.5px);
        --desktop-nav-text-size: clamp(10.35px, calc(18.62px * var(--desktop-layout-scale, 1)), 18.62px);
        --desktop-nav-item-gap: clamp(3.5px, calc(8.36px * var(--desktop-layout-scale, 1)), 8.36px);
        --desktop-nav-link-x-padding: clamp(4px, calc(8.36px * var(--desktop-layout-scale, 1)), 8.36px);
        --desktop-nav-link-inner-gap: clamp(4px, calc(7.98px * var(--desktop-layout-scale, 1)), 7.98px);
        --desktop-nav-offset-x: clamp(4px, calc(9.5px * var(--desktop-layout-scale, 1)), 9.5px);
        --desktop-menu-offset-y: clamp(0px, calc(2px * var(--desktop-layout-scale, 1)), 2px);
        --desktop-search-width: clamp(210px, calc(513px * var(--desktop-layout-scale, 1)), 513px);
        --desktop-search-min-width: clamp(148px, calc(320px * var(--desktop-layout-scale, 1)), 320px);
        --desktop-search-offset-x: clamp(4px, calc(25.65px * var(--desktop-layout-scale, 1)), 25.65px);
        --desktop-nav-popup-scale: 1.04;
        --desktop-nav-inner-scale: 1.08;
        --desktop-nav-icon-popup-scale: 1.12;
        padding: clamp(4px, calc(6px * var(--desktop-layout-scale, 1)), 6px) 0 !important;
    }
    .navbar > .container {
        flex-wrap: nowrap !important;
        justify-content: flex-start;
        align-items: center;
        padding-left: clamp(6px, calc(8px * var(--desktop-layout-scale, 1)), 8px);
        padding-right: clamp(12px, calc(20px * var(--desktop-layout-scale, 1)), 20px);
    }
    .navbar-toggler {
        display: none !important;
    }
    .navbar-collapse {
        display: flex !important;
        flex: 0 0 auto !important;
        order: 1;
        justify-content: flex-start;
        width: auto !important;
        max-width: none !important;
        background: none !important;
        border: none !important;
        box-shadow: none !important;
        backdrop-filter: none !important;
        border-radius: 0 !important;
        margin-top: 0 !important;
        padding: 0 !important;
        animation: none !important;
        overflow: visible !important;
        position: static !important;
        align-self: auto !important;
    }
    .navbar-collapse::before,
    .navbar-collapse::after {
        display: none !important;
    }
    .navbar-collapse .navbar-nav {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        justify-content: flex-start !important;
        gap: var(--desktop-nav-item-gap) !important;
        margin-left: var(--desktop-nav-offset-x) !important;
        padding: 0 !important;
    }
    .navbar-collapse .nav-link {
        flex-direction: row !important;
        padding: calc(6px * var(--desktop-layout-scale, 1)) var(--desktop-nav-link-x-padding) !important;
        border: none !important;
        background: transparent !important;
        box-shadow: none !important;
        border-radius: calc(6px * var(--desktop-layout-scale, 1)) !important;
        font-size: var(--desktop-nav-text-size) !important;
        gap: var(--desktop-nav-link-inner-gap) !important;
        min-height: auto !important;
        white-space: nowrap !important;
        transform-origin: left center;
    }
    .navbar-collapse .nav-link {
        position: relative;
        top: var(--desktop-menu-offset-y);
    }
    .navbar-collapse .nav-link:hover {
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
        transform: translateY(calc(-1px * var(--desktop-layout-scale, 1))) scale(var(--desktop-nav-popup-scale)) !important;
    }
    .navbar-collapse .nav-link.active {
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
    }
    .navbar-collapse .nav-link::before {
        display: none !important;
    }
    .navbar-collapse .nav-link::after {
        display: none !important;
    }
    .navbar-collapse .nav-link-icon {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        width: var(--desktop-menu-icon-size) !important;
        height: var(--desktop-menu-icon-size) !important;
        font-size: var(--desktop-menu-icon-size) !important;
        line-height: var(--desktop-menu-icon-size) !important;
        margin-right: 0 !important;
        flex: 0 0 var(--desktop-menu-icon-size);
        color: rgba(180, 170, 255, 0.8) !important;
    }
    .navbar-collapse .nav-link > span {
        display: inline-block;
        transition: transform 0.3s ease, text-shadow 0.3s ease;
    }
    .navbar-search-inline { order: 12; border-top: none; padding-top: calc(5px * var(--desktop-layout-scale, 1)); padding-bottom: calc(5px * var(--desktop-layout-scale, 1)); flex: 1 1 var(--desktop-search-width); min-width: min(100%, var(--desktop-search-min-width)); width: min(100%, var(--desktop-search-width)); max-width: var(--desktop-search-width); margin-left: var(--desktop-search-offset-x); }
    .navbar-icons { order: 13; border-top: none; padding-top: calc(5px * var(--desktop-layout-scale, 1)); padding-bottom: calc(5px * var(--desktop-layout-scale, 1)); margin-left: auto; flex: 0 0 auto; min-width: clamp(44px, calc(72px * var(--desktop-layout-scale, 1)), 72px); justify-content: flex-end; }
    .navbar-icons .nav-icon,
    .navbar-icons .profile-btn {
        transition: transform 0.3s cubic-bezier(0.23, 1, 0.32, 1), filter 0.3s ease, color 0.3s ease;
        transform-origin: center center;
    }
    .navbar-icons .nav-icon:hover,
    .navbar-icons .profile-btn:hover {
        transform: translateY(calc(-1px * var(--desktop-layout-scale, 1))) scale(var(--desktop-nav-icon-popup-scale)) !important;
        filter: drop-shadow(0 0 calc(10px * var(--desktop-layout-scale, 1)) rgba(0,243,255,0.55));
    }
    .navbar-nav { margin-right: 0; margin-left: var(--desktop-nav-offset-x); padding-left: 0; }
    .navbar-collapse .nav-link:hover > span {
        transform: scale(var(--desktop-nav-popup-scale));
        text-shadow: 0 0 calc(10px * var(--desktop-layout-scale, 1)) rgba(150,120,255,0.35);
    }
    .navbar-collapse .nav-link:hover .nav-link-icon {
        color: #fff !important;
        filter: none !important;
        transform: none !important;
    }
    .navbar-collapse .nav-link.active .nav-link-icon {
        color: rgba(214, 204, 255, 0.95) !important;
        filter: none !important;
        transform: none !important;
    }
}
@media (max-width: 991.98px) {
    .navbar > .container {
        flex-wrap: wrap;
        justify-content: flex-start;
        padding-left: 8px;
        padding-right: 8px;
        position: relative;
    }
    .navbar-toggler {
        order: 1;
    }
    .navbar-search-inline {
        order: 2;
        flex: 1 1 0%;
        min-width: 0;
        margin-right: 6px;
        margin-left: 10px;
        border-top: none;
        padding-top: 0;
        padding-bottom: 0;
    }
    .navbar-icons {
        order: 3;
        border-top: none;
        padding-top: 0;
        padding-bottom: 0;
        margin-left: auto;
        flex: 0 0 auto;
        flex-wrap: nowrap !important;
        min-width: 56px;
        justify-content: flex-end;
    }
    .navbar-collapse {
        order: 4;
        flex-basis: auto !important;
        flex-grow: 0 !important;
        width: min(92vw, 300px) !important;
        max-width: min(92vw, 300px) !important;
        min-width: auto;
        position: absolute !important;
        top: calc(100% + 7px) !important;
        left: 8px !important;
        z-index: 1000;
    }

    /* --- TOGGLER BUTTON (COSMIC) --- */
    .navbar-toggler {
        order: 1;
        border: 1px solid rgba(130,100,255,0.3);
        border-radius: 8px;
        padding: 5px 7px;
        background: linear-gradient(135deg, rgba(80,50,200,0.12), rgba(100,150,255,0.06));
        transition: all 0.4s var(--ease);
        position: relative;
        overflow: hidden;
        display: flex;
        align-items: center;
        justify-content: center;
        align-self: center;
    }
    .navbar-toggler::before {
        content: '';
        position: absolute;
        inset: -1px;
        background: linear-gradient(135deg, rgba(100,60,255,0.5), rgba(150,100,255,0.3), transparent 70%);
        opacity: 0;
        transition: opacity 0.3s ease;
        border-radius: 8px;
        z-index: -1;
    }
    .navbar-toggler:hover::before,
    .navbar-toggler:focus::before {
        opacity: 1;
    }
    .navbar-toggler:hover,
    .navbar-toggler:focus {
        border-color: rgba(130,100,255,0.6);
        box-shadow: 0 0 18px rgba(100,60,255,0.4), 0 0 40px rgba(80,40,200,0.2), inset 0 0 12px rgba(120,80,255,0.15);
        background: linear-gradient(135deg, rgba(80,50,200,0.2), rgba(100,150,255,0.1));
        outline: none;
        filter: none;
    }
    .navbar-toggler:focus {
        box-shadow: 0 0 18px rgba(100,60,255,0.4), 0 0 40px rgba(80,40,200,0.2);
    }
    .navbar-toggler {
        font-size: 2rem;
    }
    .navbar-toggler-icon {
        width: 1em;
        height: 1em;
        filter: brightness(1.8) drop-shadow(0 0 4px rgba(150,120,255,0.6)) drop-shadow(0 0 8px rgba(100,60,255,0.3));
    }
    .navbar-icons { order: 3; margin-left: auto; gap: 1.2rem !important; align-items: center; flex: 0 0 auto; min-width: 56px; justify-content: flex-end; }

    /* --- COLLAPSE CONTAINER (COSMIC) --- */
    .navbar-collapse {
        order: 4 !important;
        width: min(92vw, 300px) !important;
        max-width: min(92vw, 300px) !important;
        min-width: auto;
        flex-basis: auto !important;
        flex-grow: 0 !important;
        margin-top: 0;
        background: linear-gradient(180deg, rgba(5,5,20,0.97) 0%, rgba(5,5,15,0.95) 100%) !important;
        border: 1px solid rgba(100,80,255,0.10) !important;
        border-top: none !important;
        border-radius: 0 0 12px 12px;
        padding: 5px;
        backdrop-filter: blur(30px) saturate(1.6);
        box-shadow: 0 8px 24px rgba(0,0,0,0.5) !important;
        animation: navSlideDown 0.4s cubic-bezier(0.23, 1, 0.32, 1);
        position: absolute !important;
        top: calc(100% + 7px) !important;
        left: 8px !important;
        z-index: 1000;
        overflow: visible;
    }

    .navbar-collapse::before,
    .navbar-collapse::after {
        display: none !important;
    }

    /* --- NAV LIST (vertical labeled list) --- */
    .navbar-collapse .navbar-nav {
        width: 100%;
        padding: 6px !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        justify-content: flex-start !important;
        gap: 6px !important;
    }

    .navbar-collapse .nav-link > span {
        display: inline-block !important;
    }

    /* --- NAV ITEMS with cosmic stagger animation --- */
    .navbar-collapse .nav-item {
        animation: navItemCosmicSlide 0.6s cubic-bezier(0.23, 1, 0.32, 1) both;
        position: relative;
    }
    .navbar-collapse .nav-item:nth-child(1) { animation-delay: 0.04s; }
    .navbar-collapse .nav-item:nth-child(2) { animation-delay: 0.08s; }
    .navbar-collapse .nav-item:nth-child(3) { animation-delay: 0.12s; }
    .navbar-collapse .nav-item:nth-child(4) { animation-delay: 0.16s; }
    .navbar-collapse .nav-item:nth-child(5) { animation-delay: 0.20s; }
    .navbar-collapse .nav-item:nth-child(6) { animation-delay: 0.24s; }
    .navbar-collapse .nav-item:nth-child(7) { animation-delay: 0.28s; }
    .navbar-collapse .nav-item:nth-child(8) { animation-delay: 0.32s; }
    .navbar-collapse .nav-item:nth-child(9) { animation-delay: 0.36s; }
    .navbar-collapse .nav-item:nth-child(10) { animation-delay: 0.40s; }

    /* No separator needed for stacked list */
    .navbar-collapse .nav-item:not(:last-child)::after {
        display: none;
    }

    @keyframes navItemCosmicSlide {
        from {
            opacity: 0;
            transform: translateX(-20px) scale(0.97);
            filter: blur(3px);
        }
        60% {
            filter: blur(0);
        }
        to {
            opacity: 1;
            transform: translateX(0) scale(1);
            filter: blur(0);
        }
    }

    /* --- NAV LINK ICON --- */
    .navbar-collapse .nav-link-icon {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 20px;
        height: 20px;
        font-size: 0.95rem;
        color: rgba(180, 170, 255, 0.8);
        transition: all 0.3s ease;
        margin: 0;
        text-align: center;
        border-radius: 0;
        background: transparent;
        filter: none;
    }
    .navbar-collapse .nav-link:hover .nav-link-icon {
        color: #fff;
        filter: none;
        transform: scale(1.1);
        background: transparent;
        box-shadow: none;
    }
    .navbar-collapse .nav-link.active .nav-link-icon {
        color: rgba(130, 200, 255, 1);
        filter: none;
        background: transparent;
        box-shadow: none;
        animation: none;
    }

    /* ============================================
       COSMIC DESIGN - CLEAN & SIMPLE
       ============================================ */

    /* --- NAV ITEMS: clean layout --- */
    .navbar-collapse .nav-item {
        overflow: hidden;
        z-index: 1;
    }

    /* --- BASE NAV LINK --- */
    .navbar-collapse .nav-link {
        width: 100%;
        min-height: 44px;
        height: auto;
        padding: 11px 12px !important;
        margin: 0;
        border-radius: 12px;
        font-size: 0.82rem;
        font-weight: 600;
        font-style: normal;
        letter-spacing: 0.7px;
        text-transform: none;
        position: relative;
        display: flex !important;
        flex-direction: row;
        align-items: center;
        justify-content: flex-start;
        text-align: left;
        overflow: visible;
        border: none !important;
        gap: 12px;
        z-index: 2;
        
        background: rgba(255,255,255,0.05);
        color: rgba(200, 190, 255, 0.85) !important;
        text-shadow: none;
        box-shadow: none;
        transition: all 0.3s ease;
        transform-origin: center center;
    }

    /* Icon spacing */
    .navbar-collapse .nav-link i.nav-link-icon {
        font-style: normal;
        margin-right: 0;
        flex: 0 0 20px;
    }

    /* Disable old before/after */
    .navbar-collapse .nav-item:not(:first-child) .nav-link::before {
        display: none !important;
    }

    .navbar-collapse .nav-item:not(:first-child) .nav-link::after {
        display: none !important;
    }

    /* --- HOVER --- */
    .navbar-collapse .nav-link:hover {
        background: rgba(100, 80, 255, 0.12) !important;
        color: #fff !important;
        transform: translateX(2px);
        box-shadow: none;
    }
    .navbar-collapse .nav-link:hover::after {
        display: none !important;
    }

    /* =============================================
       ACTIVE LINK: COSMIC GLOW
       ============================================= */
    .navbar-collapse .nav-link.active {
        background: rgba(80, 60, 255, 0.15) !important;
        color: #fff !important;
        box-shadow: none !important;
    }

    .navbar-collapse .nav-link.active::after {
        display: none !important;
    }

    /* --- No indicator dots --- */
    .navbar-collapse .nav-link > .nav-dot {
        display: none;
    }

    /* --- SLIDE DOWN ANIMATION (COSMIC) --- */
    @keyframes navSlideDown {
        from {
            opacity: 0;
            transform: translateY(-12px) scaleY(0.95);
            filter: blur(4px);
        }
        60% {
            filter: blur(1px);
        }
        to {
            opacity: 1;
            transform: translateY(0) scaleY(1);
            filter: blur(0);
        }
    }

    /* ============================================
       PROFILE DROPDOWN → ICON-ONLY (like nav menu)
       ============================================ */
    .profile-dropdown {
        /* === POSITION: fixed to viewport, JS sets top dynamically === */
        position: fixed !important;
        right: 0 !important;
        left: auto !important;
        z-index: 1000 !important;

        /* === SIZE: same as navbar-collapse === */
        width: fit-content !important;
        min-width: auto !important;
        max-width: 55% !important;

        /* === BACKGROUND: identical to navbar-collapse === */
        background: linear-gradient(180deg, rgba(5,5,20,0.97) 0%, rgba(5,5,15,0.95) 100%) !important;

        /* === BORDER: identical to navbar-collapse === */
        border: 1px solid rgba(100,80,255,0.10) !important;
        border-top: none !important;
        border-radius: 0 0 12px 12px !important;

        /* === SPACING: identical to navbar-collapse === */
        padding: 5px !important;
        margin-top: 0 !important;

        /* === EFFECTS: identical to navbar-collapse === */
        backdrop-filter: blur(30px) saturate(1.6) !important;
        box-shadow: 0 8px 24px rgba(0,0,0,0.5) !important;

        /* === OVERFLOW === */
        overflow: visible !important;
        max-height: 85vh !important;

        /* === CLOSED STATE: replicates navSlideDown 'from' keyframe === */
        opacity: 0 !important;
        visibility: hidden !important;
        transform: translateY(-12px) scaleY(0.95) !important;
        filter: blur(4px) !important;

        /* === TRANSITION: replicates navSlideDown timing === */
        transition: opacity 0.4s cubic-bezier(0.23, 1, 0.32, 1),
                    visibility 0.4s cubic-bezier(0.23, 1, 0.32, 1),
                    transform 0.4s cubic-bezier(0.23, 1, 0.32, 1),
                    filter 0.4s cubic-bezier(0.23, 1, 0.32, 1) !important;
    }

    /* === OPEN STATE: replicates navSlideDown 'to' keyframe === */
    .profile-dropdown.open {
        opacity: 1 !important;
        visibility: visible !important;
        transform: translateY(0) scaleY(1) !important;
        filter: blur(0) !important;
    }

    .profile-dropdown::before,
    .profile-dropdown::after {
        display: none !important;
    }

    /* Hide profile header (avatar, name, tier, uid, dividers) */
    .profile-dropdown .profile-logged-in > img,
    .profile-dropdown .profile-logged-in > .profile-avatar,
    .profile-dropdown .profile-logged-in > .profile-name,
    .profile-dropdown .profile-logged-in > div[style*="inline-flex"],
    .profile-dropdown .profile-dropdown-uid,
    .profile-dropdown .profile-dropdown-divider {
        display: none !important;
    }

    /* Hide all text in profile links, show only icons */
    .profile-dropdown .profile-dropdown-link {
        width: 36px !important;
        height: 36px !important;
        padding: 4px !important;
        margin: 0 !important;
        border-radius: 10px !important;
        background: rgba(255,255,255,0.05) !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        font-size: 0 !important;
        gap: 0 !important;
        color: transparent !important;
        overflow: hidden !important;
        position: relative !important;
        transition: all 0.3s ease !important;
    }
    .profile-dropdown .profile-dropdown-link i:first-child {
        font-size: 1.3rem !important;
        width: 28px !important;
        height: 28px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        margin: 0 !important;
    }
    /* Default icon color for those without inline style */
    .profile-dropdown .profile-dropdown-link i.fa-user,
    .profile-dropdown .profile-dropdown-link i.fa-cog,
    .profile-dropdown .profile-dropdown-link i.fa-globe {
        color: rgba(180, 170, 255, 0.8) !important;
    }
    /* Hide lock icons and badges */
    .profile-dropdown .profile-dropdown-link i.fa-lock,
    .profile-dropdown .profile-dropdown-link .badge {
        display: none !important;
    }
    .profile-dropdown .profile-dropdown-link:hover {
        background: rgba(100, 80, 255, 0.12) !important;
        transform: scale(1.05) !important;
    }
    .profile-dropdown .profile-dropdown-link:hover i:first-child {
        color: #fff !important;
    }
    /* Language section - hide text, compact */
    .profile-dropdown .profile-dropdown-link div[style*="display:flex"] {
        display: none !important;
    }

    /* Logout button → icon only */
    .profile-dropdown .auth-logout-btn {
        width: 36px !important;
        height: 36px !important;
        padding: 4px !important;
        margin: 0 !important;
        border-radius: 10px !important;
        background: rgba(255,0,85,0.08) !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        font-size: 0 !important;
        color: transparent !important;
        min-width: auto !important;
        border: none !important;
    }
    .profile-dropdown .auth-logout-btn i {
        font-size: 1.3rem !important;
        color: var(--secondary) !important;
        margin: 0 !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    .profile-dropdown .auth-logout-btn:hover {
        background: rgba(255,0,85,0.18) !important;
        transform: scale(1.05) !important;
    }

    /* Layout: vertical column centered */
    .profile-dropdown .profile-logged-in {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        gap: 2px !important;
        padding: 3px !important;
    }

    /* Auth buttons (signed out) → icon only */
    .profile-dropdown .auth-dropdown-btn {
        width: 36px !important;
        height: 36px !important;
        padding: 4px !important;
        margin: 2px 0 !important;
        border-radius: 10px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        font-size: 0 !important;
        gap: 0 !important;
        min-width: auto !important;
    }
    .profile-dropdown .auth-dropdown-btn i {
        font-size: 1.3rem !important;
        margin: 0 !important;
    }


}

@media (max-width: 768px) {
    .hero-title { font-size: clamp(1.6rem, 6vw, 2.5rem); }
    .char-card { aspect-ratio: 3 / 4; }
    .full-screen-modal { padding: 15px 0; }
    .filter-scroll-btn {
        width: 34px;
        height: 34px;
        font-size: 0.8rem;
        border-width: 2px;
    }
    .filter-bar .filter-icon {
        width: 34px;
        height: 34px;
        font-size: 0.85rem;
    }
    .filter-bar {
        padding: 5px 6px;
        gap: 5px;
    }
    .filter-btn {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
}

/* === DESKTOP MODAL LAYOUT === */
@media (min-width: 768px) {
    .full-screen-modal .container {
        max-width: 100% !important;
        padding: 0 16px !important;
    }
    .full-screen-modal .row.mt-3 {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        align-items: flex-start !important;
        gap: 10px !important;
        margin-top: 1rem !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        --bs-gutter-x: 0 !important;
    }
    .full-screen-modal .row.mt-3 > .col-md-5 {
        width: calc(50% - 5px) !important;
        max-width: calc(50% - 5px) !important;
        min-width: calc(50% - 5px) !important;
        flex: 0 0 calc(50% - 5px) !important;
        position: sticky;
        top: 20px;
        align-self: flex-start;
        order: 0 !important;
        margin: 0 !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        padding-top: 0 !important;
    }
    .full-screen-modal .row.mt-3 > .col-md-7 {
        width: calc(50% - 5px) !important;
        max-width: calc(50% - 5px) !important;
        min-width: calc(50% - 5px) !important;
        flex: 0 0 calc(50% - 5px) !important;
        order: 0 !important;
        margin: 0 !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        padding-top: 0 !important;
    }
    .full-screen-modal .col-md-7 .story-section {
        margin-top: 0 !important;
    }
    .model-viewer-container {
        width: min(100%, calc(100vh - 120px)) !important;
        height: auto !important;
        aspect-ratio: 1 / 1 !important;
        max-height: none !important;
        max-width: none !important;
    }
    .full-screen-modal .col-md-5 .char-profile-panel,
    .full-screen-modal .col-md-5 .combat-stats-section,
    .full-screen-modal .col-md-5 .overall-rating,
    .full-screen-modal .col-md-5 .skills-section,
    .full-screen-modal .col-md-5 .model-header,
    .full-screen-modal .col-md-5 > h3,
    .full-screen-modal .col-md-5 > .skill-grid {
        width: min(100%, calc(100vh - 120px)) !important;
    }
}

/* === PORTRAIT / MOBILE MODAL FIX === */
@media (max-width: 767.98px) {
    .full-screen-modal .container { padding: 0 12px; }
    .full-screen-modal .row { flex-direction: column; }
    .full-screen-modal .col-md-5,
    .full-screen-modal .col-md-7 { width: 100%; max-width: 100%; }
    /* Name & universe first on mobile */
    .full-screen-modal .col-md-7 { order: 1; }
    .full-screen-modal .col-md-5 { order: -1; margin-bottom: 16px; }
    #modalName { font-size: clamp(1.2rem, 5vw, 1.8rem) !important; }

    #modalStory { font-size: 0.85rem !important; margin-bottom: 20px !important; line-height: 1.7 !important; }
    .story-container { padding: 20px !important; }
    .story-header-title span { font-size: 1rem !important; }
    .skills-header-title span { font-size: 1rem !important; }
    .combat-stats-header-title span { font-size: 0.9rem !important; }
    .full-screen-modal h3 { font-size: 1.1rem; }
    .skill-grid { gap: 6px !important; margin-top: 12px !important; }
    .skill-btn { padding: 8px 6px !important; font-size: 0.7rem !important; }
    .model-viewer-container { aspect-ratio: 1/1 !important; }
    .char-profile-panel { margin-top: 16px; }
    .close-modal { top: 10px; left: 10px; width: 38px; height: 38px; font-size: 1.3rem; }
}
@media (max-width: 480px) {
    .full-screen-modal { padding: 10px 0; }
    .full-screen-modal .container { padding: 0 8px; }
    #modalName { font-size: clamp(1rem, 4.5vw, 1.5rem) !important; }
    .model-viewer-container { aspect-ratio: 1/1 !important; }
    .bio-grid { grid-template-columns: 1fr 1fr !important; }
    .bio-item { padding: 8px 12px !important; }
    .bio-label { font-size: 0.55rem !important; }
    .bio-value { font-size: 0.85rem !important; }
    .profile-header h4 { font-size: 0.8rem !important; }
    .stat-row { padding: 5px 12px !important; }
    .stat-icon { width: 22px !important; height: 22px !important; font-size: 0.55rem !important; }
    .stat-name { width: 75px !important; font-size: 0.55rem !important; }
    .stat-value { font-size: 0.75rem !important; }
    .overall-rating { padding: 14px 16px !important; }
    .overall-value { font-size: 2rem !important; }
    .overall-value { font-size: 1.2rem !important; }
    .skill-btn-name { font-size: 0.75rem; }
    .skill-btn-cd { font-size: 0.6rem; }
}

/* --- COSMIC UTILITY CLASSES --- */
.cosmic-border {
    border: 1px solid rgba(0,243,255,0.2);
    animation: borderGlow 4s ease-in-out infinite;
}

.cosmic-glass {
    background: rgba(5,5,20,0.6);
    backdrop-filter: blur(15px) saturate(1.3);
    border: 1px solid rgba(0,243,255,0.15);
    border-radius: 12px;
}

/* Cosmic button styles */
.btn-outline-info {
    border-color: rgba(0,243,255,0.4) !important;
    color: var(--primary) !important;
    transition: all 0.3s !important;
    letter-spacing: 1px;
}
.btn-outline-info:hover {
    background: rgba(0,243,255,0.15) !important;
    border-color: var(--primary) !important;
    box-shadow: 0 0 20px rgba(0,243,255,0.3) !important;
    color: #fff !important;
}
.btn-danger {
    background: linear-gradient(135deg, var(--secondary), #cc0044) !important;
    border: none !important;
    box-shadow: 0 0 15px rgba(255,0,85,0.3);
    transition: all 0.3s !important;
}
.btn-danger:hover {
    box-shadow: 0 0 25px rgba(255,0,85,0.5) !important;
    transform: translateY(-2px);
}
.btn-outline-warning {
    border-color: rgba(255,215,0,0.5) !important;
    color: var(--accent) !important;
    transition: all 0.3s !important;
}
.btn-outline-warning:hover {
    background: rgba(255,215,0,0.15) !important;
    box-shadow: 0 0 20px rgba(255,215,0,0.3) !important;
}
.btn-info {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark)) !important;
    border: none !important;
    color: #000 !important;
    box-shadow: 0 0 15px rgba(0,243,255,0.3);
    transition: all 0.3s !important;
}
.btn-info:hover {
    box-shadow: 0 0 30px rgba(0,243,255,0.5) !important;
    transform: translateY(-2px);
}

/* Form controls cosmic */
.form-control {
    background: rgba(5,5,20,0.8) !important;
    border-color: rgba(0,243,255,0.2) !important;
    color: #fff !important;
    transition: all 0.3s;
}
.form-control:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 15px rgba(0,243,255,0.2) !important;
}
