/* ===== SCSD Abmeldung – Redesign ===== */

:root {
    --bg-dark: #0a0a0f;
    --bg-card: #111118;
    --bg-input: #1a1a26;
    --bg-input-hover: #1f1f30;
    --accent-gold: #d4a843;
    --accent-gold-light: #e8c46a;
    --accent-gold-dim: rgba(212, 168, 67, 0.12);
    --accent-glow: rgba(212, 168, 67, 0.35);
    --text-primary: #f0f2f8;
    --text-secondary: #9ca3b4;
    --text-muted: #5c6478;
    --border: rgba(255, 255, 255, 0.06);
    --border-gold: rgba(212, 168, 67, 0.2);
    --radius: 12px;
    --radius-lg: 24px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
    min-height: 100dvh;
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
    background-image:
        radial-gradient(ellipse 80% 60% at 50% 0%, rgba(212, 168, 67, 0.04) 0%, transparent 60%),
        radial-gradient(ellipse 60% 50% at 50% 100%, rgba(212, 168, 67, 0.025) 0%, transparent 50%);
}

/* ===== Animated Background Glows ===== */
.bg-glow {
    position: fixed;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    filter: blur(140px);
    animation: glow-drift 14s ease-in-out infinite alternate;
}
.bg-glow-1 {
    width: clamp(280px, 40vw, 600px);
    height: clamp(280px, 40vw, 600px);
    top: -8%;
    left: -3%;
    background: radial-gradient(circle, rgba(212, 168, 67, 0.07) 0%, transparent 70%);
}
.bg-glow-2 {
    width: clamp(200px, 30vw, 500px);
    height: clamp(200px, 30vw, 500px);
    bottom: -8%;
    right: -3%;
    background: radial-gradient(circle, rgba(212, 168, 67, 0.05) 0%, transparent 70%);
    animation-delay: -7s;
}
@keyframes glow-drift {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(20px, -15px) scale(1.08); }
}

/* ===== Page Wrapper ===== */
.page-wrapper {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: clamp(24px, 4vh, 60px) clamp(16px, 4vw, 48px);
}

/* ===== Back Link ===== */
.back-link {
    position: fixed;
    top: clamp(16px, 2.5vh, 32px);
    left: clamp(16px, 2.5vw, 40px);
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 10px;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 10;
}
.back-link:hover {
    color: var(--accent-gold);
    background: rgba(212, 168, 67, 0.08);
    border-color: var(--border-gold);
    box-shadow: 0 4px 20px -4px rgba(212, 168, 67, 0.15);
}
.back-link i {
    font-size: 0.74rem;
    transition: transform 0.3s ease;
}
.back-link:hover i {
    transform: translateX(-4px);
}

/* ===== Card ===== */
.abmeldung-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: clamp(32px, 5vw, 56px) clamp(24px, 4vw, 52px) clamp(28px, 4vw, 48px);
    max-width: 560px;
    width: 100%;
    position: relative;
    box-shadow:
        0 30px 80px -20px rgba(0, 0, 0, 0.55),
        0 0 0 1px rgba(255, 255, 255, 0.03) inset;
    animation: card-enter 0.65s cubic-bezier(.22, .9, .36, 1) both;
}
/* Gold top-border accent line */
.abmeldung-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent-gold), transparent);
    border-radius: 0 0 4px 4px;
    opacity: 0.6;
}
@keyframes card-enter {
    0% { opacity: 0; transform: translateY(20px) scale(0.985); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

/* ===== Logo ===== */
.card-logo {
    text-align: center;
    margin-bottom: 12px;
}
.card-logo img {
    width: clamp(60px, 8vw, 80px);
    height: clamp(60px, 8vw, 80px);
    object-fit: contain;
    border-radius: 16px;
    filter: drop-shadow(0 0 20px rgba(212, 168, 67, 0.25));
    animation: logo-pulse 3.5s ease-in-out infinite alternate;
}
@keyframes logo-pulse {
    0% { filter: drop-shadow(0 0 14px rgba(212, 168, 67, 0.18)); }
    100% { filter: drop-shadow(0 0 28px rgba(212, 168, 67, 0.4)); }
}

/* ===== Title Section ===== */
.card-title-section {
    text-align: center;
    margin-bottom: clamp(24px, 3vw, 36px);
}
.card-title-section h1 {
    font-size: clamp(1.4rem, 3vw, 1.9rem);
    font-weight: 800;
    color: var(--accent-gold);
    letter-spacing: 1.5px;
    margin-bottom: 6px;
    text-shadow: 0 0 30px rgba(212, 168, 67, 0.15);
}
.card-subtitle {
    font-size: clamp(0.68rem, 1.2vw, 0.82rem);
    color: var(--text-muted);
    letter-spacing: clamp(1.5px, 0.3vw, 3px);
    text-transform: uppercase;
    font-weight: 500;
}

/* ===== Divider under title ===== */
.card-title-section::after {
    content: '';
    display: block;
    width: 40px;
    height: 2px;
    background: var(--accent-gold);
    margin: 16px auto 0;
    border-radius: 2px;
    opacity: 0.35;
}

/* ===== Form ===== */
form {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(12px, 2vw, 20px);
}

.form-group {
    margin-bottom: clamp(16px, 2vw, 22px);
}

.form-group label {
    display: flex;
    align-items: center;
    font-size: clamp(0.7rem, 1.1vw, 0.78rem);
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 1.2px;
    text-transform: uppercase;
    margin-bottom: 8px;
}
.form-group label i {
    color: var(--accent-gold);
    margin-right: 7px;
    font-size: 0.72rem;
    opacity: 0.7;
    width: 14px;
    text-align: center;
}

/* ===== Inputs ===== */
.abmeldung-card input[type="text"],
.abmeldung-card input[type="date"],
.abmeldung-card select {
    width: 100%;
    height: clamp(44px, 5vw, 50px);
    padding: 0 16px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-size: clamp(0.88rem, 1.2vw, 0.95rem);
    font-weight: 400;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    transition: all 0.25s ease;
    box-sizing: border-box;
}
.abmeldung-card input[type="text"]::placeholder {
    color: var(--text-muted);
    font-weight: 400;
}
.abmeldung-card input[type="text"]:hover,
.abmeldung-card input[type="date"]:hover,
.abmeldung-card select:hover {
    border-color: rgba(255, 255, 255, 0.12);
    background: var(--bg-input-hover);
}
.abmeldung-card input[type="text"]:focus,
.abmeldung-card input[type="date"]:focus,
.abmeldung-card select:focus {
    border-color: var(--accent-gold);
    background: var(--bg-input-hover);
    box-shadow: 0 0 0 3px var(--accent-gold-dim), 0 0 24px -6px rgba(212, 168, 67, 0.12);
}

/* ===== Select Custom Arrow ===== */
.select-wrapper {
    position: relative;
}
.select-wrapper select {
    padding-right: 42px;
    cursor: pointer;
}
.select-arrow {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.68rem;
    pointer-events: none;
    transition: all 0.25s ease;
}
.select-wrapper:hover .select-arrow {
    color: var(--accent-gold);
}

/* ===== Date Inputs ===== */
.abmeldung-card input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(0.65) brightness(1.4) sepia(0.4) hue-rotate(10deg);
    opacity: 0.5;
    cursor: pointer;
    transition: all 0.25s;
}
.abmeldung-card input[type="date"]:hover::-webkit-calendar-picker-indicator,
.abmeldung-card input[type="date"]:focus::-webkit-calendar-picker-indicator {
    opacity: 0.9;
    filter: invert(0.8) brightness(1.8) sepia(0.5) hue-rotate(10deg);
}

/* ===== Submit Button ===== */
.abmeldung-card button[type="submit"] {
    width: 100%;
    height: clamp(48px, 5.5vw, 54px);
    margin-top: clamp(4px, 1vw, 12px);
    background: linear-gradient(135deg, var(--accent-gold), #b8912e);
    color: #0a0a0f;
    font-family: 'Inter', sans-serif;
    font-size: clamp(0.85rem, 1.2vw, 0.95rem);
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 24px -6px rgba(212, 168, 67, 0.3);
    position: relative;
    overflow: hidden;
}
.abmeldung-card button[type="submit"]::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.18), transparent);
    transition: left 0.5s ease;
}
.abmeldung-card button[type="submit"]:hover::before {
    left: 100%;
}
.abmeldung-card button[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 36px -6px rgba(212, 168, 67, 0.45);
    background: linear-gradient(135deg, var(--accent-gold-light), var(--accent-gold));
}
.abmeldung-card button[type="submit"]:active {
    transform: translateY(0);
    box-shadow: 0 2px 12px -2px rgba(212, 168, 67, 0.25);
}
.abmeldung-card button[type="submit"] i {
    font-size: 0.84rem;
    transition: transform 0.3s ease;
}
.abmeldung-card button[type="submit"]:hover i {
    transform: translateX(3px) rotate(-12deg);
}

/* ===== Footer ===== */
.footer-text {
    margin-top: clamp(20px, 3vh, 36px);
    font-size: 0.72rem;
    color: var(--text-muted);
    letter-spacing: 1px;
    text-align: center;
    opacity: 0.45;
}

/* ===== Select option styling (dark) ===== */
.abmeldung-card select option {
    background: #1a1a26;
    color: var(--text-primary);
}

/* =============================================
   RESPONSIVE BREAKPOINTS
   ============================================= */

/* ===== Ultra-wide / Large desktop (1600px+) ===== */
@media (min-width: 1600px) {
    .abmeldung-card {
        max-width: 600px;
        padding: 60px 56px 52px;
    }
    .card-logo img {
        width: 88px;
        height: 88px;
    }
    .card-title-section h1 {
        font-size: 2.1rem;
    }
    .abmeldung-card input[type="text"],
    .abmeldung-card input[type="date"],
    .abmeldung-card select {
        height: 54px;
        font-size: 1rem;
    }
    .abmeldung-card button[type="submit"] {
        height: 58px;
        font-size: 1rem;
    }
}

/* ===== Standard desktop (1200px–1599px) ===== */
@media (min-width: 1200px) and (max-width: 1599px) {
    .abmeldung-card {
        max-width: 560px;
    }
}

/* ===== Small laptop / short screens ===== */
@media (max-height: 700px) and (min-width: 601px) {
    .page-wrapper {
        padding: 16px 24px;
    }
    .abmeldung-card {
        padding: 28px 32px 24px;
    }
    .card-logo img {
        width: 52px;
        height: 52px;
    }
    .card-title-section {
        margin-bottom: 18px;
    }
    .card-title-section h1 {
        font-size: 1.35rem;
    }
    .card-title-section::after {
        margin-top: 10px;
    }
    .form-group {
        margin-bottom: 14px;
    }
    .abmeldung-card input[type="text"],
    .abmeldung-card input[type="date"],
    .abmeldung-card select {
        height: 42px;
    }
    .abmeldung-card button[type="submit"] {
        height: 44px;
    }
    .footer-text {
        margin-top: 14px;
    }
}

/* ===== Tablet landscape (768px–1024px) ===== */
@media (min-width: 768px) and (max-width: 1024px) {
    .abmeldung-card {
        max-width: 500px;
        padding: 40px 36px 34px;
    }
}

/* ===== Tablet portrait (601px–767px) ===== */
@media (min-width: 601px) and (max-width: 767px) {
    .abmeldung-card {
        max-width: 460px;
        padding: 36px 30px 28px;
    }
}

/* ===== Mobile (max 600px) ===== */
@media (max-width: 600px) {
    .page-wrapper {
        padding: 16px 14px;
        justify-content: flex-start;
        padding-top: 72px;
    }
    .back-link {
        top: 12px;
        left: 12px;
        font-size: 0.76rem;
        padding: 8px 14px;
    }
    .abmeldung-card {
        padding: 28px 20px 24px;
        border-radius: 18px;
        max-width: 100%;
    }
    .abmeldung-card::before {
        width: 50%;
    }
    .card-logo img {
        width: 56px;
        height: 56px;
    }
    .card-title-section {
        margin-bottom: 20px;
    }
    .card-title-section h1 {
        font-size: 1.3rem;
        letter-spacing: 0.8px;
    }
    .card-subtitle {
        font-size: 0.65rem;
        letter-spacing: 1.5px;
    }
    .card-title-section::after {
        margin-top: 12px;
        width: 30px;
    }
    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
    .form-group {
        margin-bottom: 16px;
    }
    .form-group label {
        font-size: 0.7rem;
    }
    .abmeldung-card input[type="text"],
    .abmeldung-card input[type="date"],
    .abmeldung-card select {
        height: 44px;
        font-size: 0.88rem;
        padding: 0 14px;
        border-radius: 10px;
    }
    .abmeldung-card button[type="submit"] {
        height: 48px;
        font-size: 0.85rem;
        border-radius: 10px;
    }
    .footer-text {
        margin-top: 18px;
        font-size: 0.65rem;
    }
}

/* ===== Very small mobile (max 380px) ===== */
@media (max-width: 380px) {
    .page-wrapper {
        padding: 12px 10px;
        padding-top: 64px;
    }
    .abmeldung-card {
        padding: 24px 16px 20px;
        border-radius: 14px;
    }
    .card-logo img {
        width: 48px;
        height: 48px;
    }
    .card-title-section h1 {
        font-size: 1.15rem;
    }
    .form-group {
        margin-bottom: 12px;
    }
    .form-group label {
        font-size: 0.66rem;
        margin-bottom: 6px;
    }
    .abmeldung-card input[type="text"],
    .abmeldung-card input[type="date"],
    .abmeldung-card select {
        height: 40px;
        font-size: 0.84rem;
    }
    .abmeldung-card button[type="submit"] {
        height: 44px;
        font-size: 0.82rem;
    }
}

/* ===== Landscape-Mode auf Handys ===== */
@media (max-height: 500px) and (orientation: landscape) {
    .page-wrapper {
        padding: 12px 24px;
        justify-content: center;
    }
    .abmeldung-card {
        padding: 20px 28px 18px;
        max-width: 520px;
    }
    .card-logo {
        margin-bottom: 4px;
    }
    .card-logo img {
        width: 40px;
        height: 40px;
    }
    .card-title-section {
        margin-bottom: 12px;
    }
    .card-title-section h1 {
        font-size: 1.15rem;
    }
    .card-subtitle {
        font-size: 0.62rem;
    }
    .card-title-section::after {
        margin-top: 8px;
        width: 28px;
    }
    .form-group {
        margin-bottom: 10px;
    }
    .form-group label {
        font-size: 0.66rem;
        margin-bottom: 4px;
    }
    .abmeldung-card input[type="text"],
    .abmeldung-card input[type="date"],
    .abmeldung-card select {
        height: 36px;
        font-size: 0.82rem;
    }
    .abmeldung-card button[type="submit"] {
        height: 38px;
        font-size: 0.8rem;
        margin-top: 4px;
    }
    .footer-text {
        margin-top: 8px;
    }
    .back-link {
        top: 8px;
        left: 8px;
        padding: 6px 12px;
        font-size: 0.72rem;
    }
}


/* ===== Login / Discord ===== */
.login-text {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.55;
    margin-bottom: 24px;
}
.discord-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    height: 52px;
    background: #5865f2;
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.95rem;
    border-radius: var(--radius);
    transition: all 0.25s ease;
    box-shadow: 0 4px 24px -6px rgba(88, 101, 242, 0.4);
}
.discord-btn:hover {
    background: #4752c4;
    transform: translateY(-2px);
    box-shadow: 0 8px 30px -6px rgba(88, 101, 242, 0.55);
}
.discord-btn i { font-size: 1.2rem; }

/* ===== User-Bar (nach Login) ===== */
.user-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}
.user-bar .user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}
.user-bar .user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--border-gold);
    flex-shrink: 0;
}
.user-bar .user-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.user-bar .user-role {
    font-size: 0.68rem;
    color: var(--text-muted);
    letter-spacing: 0.6px;
    text-transform: uppercase;
}
.logout-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 14px;
    border: 1px solid var(--border);
    background: var(--bg-input);
    color: var(--text-secondary);
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}
.logout-btn:hover {
    background: var(--bg-input-hover);
    color: var(--text-primary);
    border-color: var(--border-gold);
}
