/* --- GLOBALS --- */
:root {
    --bg-dark: #0a0e14;
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --accent: #00d4ff;
    --accent-glow: rgba(0, 212, 255, 0.4);
    --text-main: #ffffff;
    --text-muted: #8b9bb4;
    --gradient-1: #ff0055;
    --gradient-2: #00d4ff;
    --gradient-3: #7000ff;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    height: 100vh;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    perspective: 1000px; /* Für 3D Tilt */
}

/* --- ANIMATED BACKGROUND --- */
.background {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: -1;
    overflow: hidden;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.6;
    animation: float 10s infinite ease-in-out;
}

.blob-1 {
    width: 500px; height: 500px;
    background: var(--gradient-3);
    top: -100px; left: -100px;
    animation-delay: 0s;
}

.blob-2 {
    width: 400px; height: 400px;
    background: var(--gradient-1);
    bottom: -50px; right: -50px;
    animation-delay: -2s;
}

.blob-3 {
    width: 300px; height: 300px;
    background: var(--gradient-2);
    top: 40%; left: 40%;
    animation-delay: -4s;
    opacity: 0.4;
}

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

/* --- GLASS CARD --- */
.auth-card {
    width: 400px;
    padding: 40px;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transform-style: preserve-3d;
    transition: transform 0.1s ease-out; /* Smooth follow */
}

.card-header {
    text-align: center;
    margin-bottom: 30px;
    transform: translateZ(20px); /* 3D pop */
}

.card-header h1 {
    font-size: 32px;
    font-weight: 800;
    background: linear-gradient(to right, #fff, #aaa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -1px;
    margin-bottom: 5px;
}

.card-header p {
    color: var(--text-muted);
    font-size: 14px;
}

/* --- TABS --- */
.tabs {
    display: flex;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    padding: 4px;
    margin-bottom: 30px;
    transform: translateZ(10px);
}

.tab-btn {
    flex: 1;
    padding: 10px;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: var(--text-muted);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tab-btn.active {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* --- FORMS & INPUTS --- */
.form-container {
    position: relative;
    min-height: 250px;
}

.auth-form {
    position: absolute;
    width: 100%;
    top: 0; left: 0;
    opacity: 0;
    pointer-events: none;
    transform: translateX(20px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.auth-form.active {
    opacity: 1;
    pointer-events: all;
    transform: translateX(0);
}

.input-group {
    position: relative;
    margin-bottom: 25px;
    transform: translateZ(5px);
}

.input-group input {
    width: 100%;
    padding: 12px 0;
    font-size: 16px;
    color: #fff;
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(255,255,255,0.2);
    outline: none;
    transition: border-color 0.3s;
}

/* Floating Label Magic */
.input-group label {
    position: absolute;
    top: 12px;
    left: 0;
    font-size: 15px;
    color: var(--text-muted);
    pointer-events: none;
    transition: all 0.3s ease;
}

.input-group input:focus ~ label,
.input-group input:not(:placeholder-shown) ~ label {
    top: -10px;
    font-size: 12px;
    color: var(--accent);
}

/* Animated Underline */
.input-group .line {
    position: absolute;
    bottom: 0; left: 0;
    width: 0;
    height: 1px;
    background: var(--accent);
    transition: width 0.3s ease;
    box-shadow: 0 0 10px var(--accent-glow);
}

.input-group input:focus ~ .line {
    width: 100%;
}

/* --- BUTTONS --- */
.cta-btn {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--accent) 0%, #0077b6 100%);
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    margin-top: 10px;
    transform: translateZ(15px);
}

.cta-btn.secondary {
    background: linear-gradient(135deg, var(--gradient-1) 0%, #a80038 100%);
}

.cta-btn:hover {
    transform: translateZ(20px) scale(1.02);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.4);
}

.cta-btn.secondary:hover {
    box-shadow: 0 0 20px rgba(255, 0, 85, 0.4);
}

/* Shine Effect on Hover */
.cta-btn .hover-effect {
    position: absolute;
    top: 0; left: -100%;
    width: 50%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transform: skewX(-20deg);
    transition: 0.5s;
}

.cta-btn:hover .hover-effect {
    left: 200%;
    transition: 0.5s;
}

/* ERROR MESSAGE */
.error-msg {
    margin-top: 20px;
    padding: 10px;
    background: rgba(233, 69, 96, 0.2);
    border: 1px solid rgba(233, 69, 96, 0.5);
    border-radius: 8px;
    color: #ff8fa3;
    font-size: 13px;
    text-align: center;
    animation: shake 0.4s ease-in-out;
}

.hidden { display: none; }

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}
