/* ================================================
   ZENTRALE NAVIGATION - CG Studio
   Wird von allen Seiten geladen - Exakt wie auf der Website
   ================================================ */

/* --- Modern Pill Navigation --- */
.nav-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 20px 5%;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 24px;
    background: rgba(6, 7, 10, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 100px;
    max-width: 1200px;
    margin: 0 auto;
}

.nav-brand {
    font-size: 22px;
    font-weight: 800;
    color: #fff;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    flex: 1 1 0%;
    justify-content: flex-start;
}

.nav-brand img {
    height: 28px;
    width: auto;
    object-fit: contain;
}

.nav-links {
    display: flex;
    gap: 8px;
    align-items: center;
    flex: 0 0 auto;
    justify-content: center;
}

.nav-links a,
.nav-link {
    color: #94a3b8; /* var(--text-muted) */
    text-decoration: none !important;
    font-weight: 700;
    font-size: 14px;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    padding: 10px 20px;
    border-radius: 100px;
    background: transparent;
    border: 1px solid transparent;
    font-family: 'Plus Jakarta Sans', sans-serif;
    letter-spacing: 1px;
    text-transform: uppercase;
    position: relative;
}

/* Entferne eventuelle Pseudo-Element-Linien */
.nav-links a::after,
.nav-link::after {
    display: none !important;
}

.nav-links a:hover,
.nav-link:hover {
    color: #fff;
    background: rgba(168, 85, 247, 0.1);
    border-color: rgba(168, 85, 247, 0.4);
    box-shadow: 0 0 20px rgba(168, 85, 247, 0.2);
    transform: translateY(-2px);
    text-decoration: none !important;
}

.nav-links a.active,
.nav-link.active {
    color: #fff !important;
    background: rgba(168, 85, 247, 0.15) !important;
    border: 1px solid rgba(168, 85, 247, 0.3) !important;
    transform: none !important;
    box-shadow: none !important;
}

.nav-right {
    flex: 1 1 0%;
    display: flex;
    justify-content: flex-end;
}

.nav-cta {
    padding: 10px 24px;
    background: linear-gradient(135deg, #a855f7, #7c3aed);
    color: #fff;
    font-weight: 600;
    font-size: 14px;
    border-radius: 100px;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-family: 'Outfit', sans-serif;
    letter-spacing: normal;
    text-transform: none;
}

.nav-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(168, 85, 247, 0.4);
}

@media (max-width: 768px) {
    .nav-links,
    .nav-right {
        display: none !important;
    }
}

/* ==============================================
   AUTH MODAL — FULL REDESIGN v6
============================================== */
@keyframes am-in {
    0% {
        opacity: 0;
        transform: scale(0.92) translateY(30px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes am-view-in {
    0% {
        opacity: 0;
        transform: translateX(12px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes am-bar {
    0% {
        background-position: 0% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

@keyframes am-orb1 {
    0%, 100% {
        transform: scale(1) translate(0, 0);
    }
    50% {
        transform: scale(1.12) translate(15px, -20px);
    }
}

@keyframes am-orb2 {
    0%, 100% {
        transform: scale(1) translate(0, 0);
    }
    50% {
        transform: scale(1.1) translate(-10px, 15px);
    }
}

@keyframes am-pulse {
    0%, 100% {
        opacity: .5;
    }
    50% {
        opacity: 1;
    }
}

/* --- Overlay backdrop --- */
#loginModalOverlay {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    background: rgba(2, 2, 14, 0.88);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
    padding: 20px;
    overflow: hidden;
    overscroll-behavior: contain;
}

body.modal-active {
    overflow: hidden !important;
}
html.modal-active {
    overflow: hidden !important;
}

#loginModalOverlay.show {
    opacity: 1;
    pointer-events: all;
}

/* Hide brand panel */
.brand-panel {
    display: none !important;
}

/* --- Glow spheres in background --- */
.am-bg-orb1 {
    position: fixed;
    pointer-events: none;
    z-index: 9998;
    width: 700px;
    height: 700px;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -60%);
    background: radial-gradient(circle, rgba(124, 58, 237, 0.18) 0%, rgba(99, 102, 241, 0.08) 40%, transparent 70%);
    filter: blur(60px);
    animation: am-orb1 8s ease-in-out infinite;
}

.am-bg-orb2 {
    position: fixed;
    pointer-events: none;
    z-index: 9998;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    bottom: 5%;
    right: 5%;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.12) 0%, transparent 70%);
    filter: blur(50px);
    animation: am-orb2 10s ease-in-out infinite;
}

.am-bg-orb3 {
    position: fixed;
    pointer-events: none;
    z-index: 9998;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    bottom: 15%;
    left: 8%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.1) 0%, transparent 70%);
    filter: blur(55px);
    animation: am-orb1 12s ease-in-out infinite reverse;
}

/* --- Card outer wrapper (for glow border trick) --- */
.auth-container {
    position: relative;
    width: 100%;
    max-width: 500px;
    z-index: 9999;
    animation: am-in 0.55s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Glowing border layer */
.auth-glow-border {
    position: absolute;
    inset: -1.5px;
    border-radius: 30px;
    background: linear-gradient(135deg,
            rgba(139, 92, 246, 0.7) 0%,
            rgba(99, 102, 241, 0.4) 30%,
            rgba(139, 92, 246, 0.1) 60%,
            transparent 100%);
    filter: blur(3px);
    z-index: 0;
}

/* Extra outer glow */
.auth-outer-glow {
    position: absolute;
    inset: -20px;
    border-radius: 50px;
    background: radial-gradient(ellipse at 50% 0%, rgba(139, 92, 246, 0.25) 0%, transparent 65%);
    filter: blur(20px);
    z-index: -1;
}

/* --- Main card --- */
.form-panel {
    position: relative;
    z-index: 1;
    background: linear-gradient(160deg, #0d0e18 0%, #07080f 100%);
    border: 1px solid rgba(139, 92, 246, 0.18);
    border-radius: 28px;
    overflow: hidden;
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.04),
        0 60px 130px rgba(0, 0, 0, 0.85),
        0 0 80px rgba(139, 92, 246, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
}

/* Animated gradient top bar */
.am-topbar {
    height: 3px;
    flex-shrink: 0;
    background: linear-gradient(90deg,
            transparent 0%,
            #6366f1 20%,
            #8b5cf6 40%,
            #a78bfa 50%,
            #8b5cf6 60%,
            #6366f1 80%,
            transparent 100%);
    background-size: 200% 100%;
    animation: am-bar 3s linear infinite;
}

/* Inner top glow inside card */
.am-inner-glow {
    position: absolute;
    width: 100%;
    height: 220px;
    top: 0;
    left: 0;
    background: radial-gradient(ellipse at 50% -10%, rgba(139, 92, 246, 0.18) 0%, transparent 65%);
    pointer-events: none;
    z-index: 0;
}

/* --- Form panel inner padding --- */
.form-panel-inner {
    position: relative;
    z-index: 1;
    padding: 38px 44px 42px;
}

/* --- Header: Logo + Close --- */
.auth-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
}

.auth-logo {
    display: flex;
    align-items: center;
    gap: 11px;
    font-size: 20px;
    font-weight: 900;
    color: #fff;
    letter-spacing: -0.5px;
    font-family: 'Outfit', sans-serif;
}

.auth-logo img {
    height: 32px;
    width: auto;
    filter: drop-shadow(0 0 10px rgba(139, 92, 246, 0.7)) drop-shadow(0 0 3px rgba(139, 92, 246, 0.4));
}

.auth-logo span {
    color: #a78bfa;
}

.close-btn {
    width: 36px;
    height: 36px;
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.07);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.28);
    cursor: pointer;
    font-size: 13px;
    transition: all 0.25s;
    flex-shrink: 0;
}

.close-btn:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.3);
    transform: rotate(90deg);
    box-shadow: 0 0 16px rgba(239, 68, 68, 0.2);
}

/* --- Tab switcher --- */
.auth-tabs {
    display: flex;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    padding: 6px;
    gap: 6px;
    margin-bottom: 30px;
}

.auth-tab {
    flex: 1;
    padding: 11px 0;
    border-radius: 11px;
    font-size: 14px;
    font-weight: 700;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    color: rgba(255, 255, 255, 0.25);
    background: transparent;
    border: none;
    font-family: inherit;
}

.auth-tab.active {
    background: linear-gradient(135deg,
            rgba(124, 58, 237, 0.3) 0%,
            rgba(99, 102, 241, 0.2) 100%);
    color: #e2d9f3;
    box-shadow:
        0 0 0 1px rgba(139, 92, 246, 0.35),
        0 4px 20px rgba(139, 92, 246, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.07);
    text-shadow: 0 0 24px rgba(167, 139, 250, 0.7);
}

.auth-tab:not(.active):hover {
    color: rgba(255, 255, 255, 0.55);
}

/* --- Form views --- */
.form-view {
    display: none;
}

.form-view.active {
    display: block;
    animation: am-view-in 0.3s ease forwards;
}

.form-header {
    display: none;
}

/* --- Inputs --- */
.input-group {
    position: relative;
    margin-bottom: 12px;
}

.input-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.custom-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.035);
    border: 1.5px solid rgba(255, 255, 255, 0.07);
    border-radius: 13px;
    padding: 14px 14px 14px 46px;
    color: #fff;
    font-size: 14px;
    font-family: inherit;
    transition: all 0.25s;
    box-sizing: border-box;
}

.custom-input::placeholder {
    color: rgba(255, 255, 255, 0.18);
}

.custom-input:focus {
    outline: none;
    border-color: rgba(139, 92, 246, 0.6);
    background: rgba(139, 92, 246, 0.07);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.12),
        0 0 25px rgba(139, 92, 246, 0.1);
}

.custom-input:focus~.input-icon {
    color: #a78bfa;
}

.custom-input.error {
    border-color: rgba(239, 68, 68, 0.55) !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.08) !important;
}

/* Chrome/Edge Autofill override */
.custom-input:-webkit-autofill,
.custom-input:-webkit-autofill:hover,
.custom-input:-webkit-autofill:focus,
.custom-input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 1000px rgba(20, 16, 40, 0.98) inset !important;
    -webkit-text-fill-color: #fff !important;
    caret-color: #fff !important;
    transition: background-color 9999s ease-in-out 0s;
}

.input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.15);
    font-size: 13px;
    pointer-events: none;
    transition: color 0.25s;
}

/* --- Password toggle --- */
.pw-toggle {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.18);
    cursor: pointer;
    font-size: 13px;
    padding: 3px;
    transition: color 0.2s;
    z-index: 2;
    display: flex;
    align-items: center;
}

.pw-toggle:hover {
    color: rgba(255, 255, 255, 0.65);
}

.custom-input.has-toggle {
    padding-right: 44px;
}

/* --- Forgot --- */
.forgot-pw-link {
    display: flex;
    justify-content: flex-end;
    margin-top: 4px;
    margin-bottom: 20px;
}

.forgot-pw-link a {
    font-size: 12px;
    color: rgba(139, 92, 246, 0.55);
    text-decoration: none;
    transition: all 0.2s;
}

.forgot-pw-link a:hover {
    color: #c4b5fd;
    text-shadow: 0 0 14px rgba(167, 139, 250, 0.6);
}

/* --- Submit button --- */
.auth-submit-btn {
    width: 100%;
    height: 54px;
    border-radius: 14px;
    border: none;
    font-size: 15px;
    font-weight: 800;
    font-family: inherit;
    cursor: pointer;
    background: linear-gradient(135deg, #6d28d9 0%, #8b5cf6 50%, #6366f1 100%);
    background-size: 200% 200%;
    color: #fff;
    box-shadow:
        0 6px 30px rgba(109, 40, 217, 0.55),
        0 2px 0 rgba(255, 255, 255, 0.12) inset,
        0 0 0 1px rgba(139, 92, 246, 0.3);
    transition: all 0.3s;
    letter-spacing: 0.4px;
    position: relative;
    overflow: hidden;
}

.auth-submit-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.12) 0%, transparent 60%);
    transition: opacity 0.25s;
}

.auth-submit-btn:hover {
    background-position: right center;
    transform: translateY(-2px);
    box-shadow:
        0 10px 40px rgba(109, 40, 217, 0.7),
        0 2px 0 rgba(255, 255, 255, 0.15) inset,
        0 0 0 1px rgba(139, 92, 246, 0.5);
}

.auth-submit-btn:active {
    transform: translateY(0);
}

/* --- Divider --- */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 20px 0;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.07), transparent);
}

.auth-divider span {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 2.5px;
    color: rgba(255, 255, 255, 0.14);
}

/* --- Social buttons --- */
.auth-social-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.btn-social {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    padding: 13px 16px;
    border-radius: 13px;
    font-size: 13.5px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.25s;
    border: 1.5px solid transparent;
    white-space: nowrap;
    overflow: hidden;
    box-sizing: border-box;
}

.btn-social i {
    display: inline-block;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
    font-size: 14px;
    margin-right: 8px;
}

.btn-social span {
    flex-shrink: 0;
}

.btn-social-discord {
    background: rgba(88, 101, 242, 0.07);
    border-color: rgba(88, 101, 242, 0.18);
    color: rgba(139, 150, 255, 0.8);
}

.btn-social-discord:hover {
    background: rgba(88, 101, 242, 0.16);
    border-color: rgba(88, 101, 242, 0.45);
    color: #fff;
    box-shadow: 0 4px 20px rgba(88, 101, 242, 0.25);
    transform: translateY(-1px);
}

.btn-social-owner {
    background: rgba(139, 92, 246, 0.05);
    border-color: rgba(139, 92, 246, 0.16);
    color: rgba(167, 139, 250, 0.75);
}

.btn-social-owner:hover {
    background: rgba(139, 92, 246, 0.14);
    border-color: rgba(139, 92, 246, 0.42);
    color: #fff;
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.25);
    transform: translateY(-1px);
}

/* --- Checkbox --- */
.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    user-select: none;
    margin-bottom: 16px;
}

.checkbox-group input {
    display: none;
}

.custom-checkbox {
    width: 19px;
    height: 19px;
    min-width: 19px;
    border-radius: 6px;
    margin-top: 1px;
    border: 1.5px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.03);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.22s;
}

.checkbox-group input:checked~.custom-checkbox {
    background: linear-gradient(135deg, #7c3aed, #8b5cf6);
    border-color: #8b5cf6;
    box-shadow: 0 0 14px rgba(139, 92, 246, 0.5);
}

.checkbox-group input:checked~.custom-checkbox::after {
    content: '';
    display: block;
    width: 4px;
    height: 8px;
    border: 2px solid #fff;
    border-top: none;
    border-left: none;
    transform: rotate(45deg) translateY(-1px);
}

.custom-checkbox.error {
    border-color: rgba(239, 68, 68, 0.5) !important;
}

.checkbox-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.32);
    line-height: 1.55;
}

.checkbox-label a {
    color: #a78bfa;
    text-decoration: none;
}

.checkbox-label a:hover {
    color: #c4b5fd;
    text-decoration: underline;
}

/* --- Footer link --- */
.auth-footer-link {
    text-align: center;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.2);
    margin-top: 18px;
}

.auth-footer-link a {
    color: #a78bfa;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s;
}

.auth-footer-link a:hover {
    color: #c4b5fd;
    text-shadow: 0 0 14px rgba(167, 139, 250, 0.6);
}



/* Custom Scrollbar Global */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: #06070a; }
::-webkit-scrollbar-thumb { background: rgba(168, 85, 247, 0.3); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(168, 85, 247, 0.6); }

