/* ============================================
   AURORA GLASSMORPHISM LOGIN — CSS
   Sercan Koç Akademi · Online Eğitim Paneli
   ============================================ */

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --aurora-1: #6366f1;
    --aurora-2: #8b5cf6;
    --aurora-3: #06b6d4;
    --aurora-4: #10b981;
    --aurora-5: #f59e0b;
    --deep-bg: #0f0c29;
    --card-bg: rgba(255, 255, 255, 0.07);
    --card-border: rgba(255, 255, 255, 0.12);
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.65);
    --accent: #818cf8;
    --accent-glow: rgba(129, 140, 248, 0.4);
    --success: #34d399;
    --danger: #f87171;
}

body {
    font-family: 'Inter', 'Poppins', sans-serif;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--deep-bg);
    overflow: hidden;
    position: relative;
}

/* ========== AURORA BACKGROUND ========== */
.aurora-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    filter: blur(80px) saturate(1.5);
}

.aurora-blob {
    position: absolute;
    border-radius: 50%;
    opacity: 0.55;
}

.aurora-blob:nth-child(1) {
    width: 600px; height: 600px;
    background: radial-gradient(circle, var(--aurora-1), transparent 70%);
    top: -10%; left: -5%;
    animation: auroraMove1 18s ease-in-out infinite alternate;
}
.aurora-blob:nth-child(2) {
    width: 500px; height: 500px;
    background: radial-gradient(circle, var(--aurora-2), transparent 70%);
    top: 50%; right: -10%;
    animation: auroraMove2 22s ease-in-out infinite alternate;
}
.aurora-blob:nth-child(3) {
    width: 450px; height: 450px;
    background: radial-gradient(circle, var(--aurora-3), transparent 70%);
    bottom: -15%; left: 30%;
    animation: auroraMove3 20s ease-in-out infinite alternate;
}
.aurora-blob:nth-child(4) {
    width: 350px; height: 350px;
    background: radial-gradient(circle, var(--aurora-4), transparent 70%);
    top: 20%; left: 60%;
    animation: auroraMove4 25s ease-in-out infinite alternate;
}
.aurora-blob:nth-child(5) {
    width: 400px; height: 400px;
    background: radial-gradient(circle, var(--aurora-5), transparent 70%);
    bottom: 30%; right: 20%;
    animation: auroraMove5 16s ease-in-out infinite alternate;
}

@keyframes auroraMove1 {
    0% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(15vw, 10vh) scale(1.2); }
    66% { transform: translate(-5vw, 25vh) scale(0.9); }
    100% { transform: translate(20vw, -5vh) scale(1.1); }
}
@keyframes auroraMove2 {
    0% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(-20vw, -15vh) scale(1.15); }
    66% { transform: translate(10vw, -25vh) scale(0.85); }
    100% { transform: translate(-15vw, 10vh) scale(1.05); }
}
@keyframes auroraMove3 {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(25vw, -20vh) scale(1.3); }
    100% { transform: translate(-10vw, -10vh) scale(0.95); }
}
@keyframes auroraMove4 {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-30vw, 15vh) scale(1.2); }
    100% { transform: translate(5vw, 20vh) scale(0.8); }
}
@keyframes auroraMove5 {
    0% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(10vw, -30vh) scale(1.1); }
    66% { transform: translate(-20vw, -10vh) scale(1.25); }
    100% { transform: translate(15vw, 5vh) scale(0.9); }
}

/* ========== GEOMETRIC PARTICLES ========== */
.geo-particles {
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    overflow: hidden;
}

.geo-shape {
    position: absolute;
    opacity: 0.12;
    animation: geoFloat linear infinite;
}

.geo-shape.circle {
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.3);
}
.geo-shape.square {
    border: 2px solid rgba(255,255,255,0.25);
    border-radius: 4px;
}
.geo-shape.triangle {
    width: 0 !important; height: 0 !important;
    border-left: 12px solid transparent;
    border-right: 12px solid transparent;
    border-bottom: 20px solid rgba(255,255,255,0.2);
    background: none !important;
}
.geo-shape.ring {
    border-radius: 50%;
    border: 2px solid rgba(129,140,248,0.3);
    background: transparent !important;
}
.geo-shape.diamond {
    border: 2px solid rgba(6,182,212,0.3);
    border-radius: 3px;
}

.geo-shape:nth-child(1)  { width:18px; height:18px; left:8%;  animation-duration:20s; animation-delay:0s; }
.geo-shape:nth-child(2)  { width:12px; height:12px; left:18%; animation-duration:28s; animation-delay:3s; }
.geo-shape:nth-child(3)  { width:22px; height:22px; left:30%; animation-duration:24s; animation-delay:1s; }
.geo-shape:nth-child(4)  { width:10px; height:10px; left:42%; animation-duration:32s; animation-delay:5s; }
.geo-shape:nth-child(5)  { width:16px; height:16px; left:55%; animation-duration:22s; animation-delay:2s; }
.geo-shape:nth-child(6)  { width:14px; height:14px; left:65%; animation-duration:26s; animation-delay:4s; }
.geo-shape:nth-child(7)  { width:20px; height:20px; left:75%; animation-duration:18s; animation-delay:6s; }
.geo-shape:nth-child(8)  { width:8px;  height:8px;  left:85%; animation-duration:30s; animation-delay:1s; }
.geo-shape:nth-child(9)  { width:15px; height:15px; left:12%; animation-duration:25s; animation-delay:7s; }
.geo-shape:nth-child(10) { width:11px; height:11px; left:50%; animation-duration:21s; animation-delay:3s; }
.geo-shape:nth-child(11) { width:17px; height:17px; left:35%; animation-duration:27s; animation-delay:8s; }
.geo-shape:nth-child(12) { width:13px; height:13px; left:90%; animation-duration:23s; animation-delay:2s; }

@keyframes geoFloat {
    0%   { transform: translateY(110vh) rotate(0deg); opacity: 0; }
    5%   { opacity: 0.12; }
    90%  { opacity: 0.12; }
    100% { transform: translateY(-10vh) rotate(540deg); opacity: 0; }
}

/* ========== GLASSMORPHISM LOGIN CARD ========== */
.login-container {
    position: relative;
    z-index: 10;
    width: 95%;
    max-width: 900px;
    perspective: 2000px;
}

.card-flipper {
    position: relative;
    width: 100%;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
}
.card-flipper.flipped {
    transform: rotateY(180deg);
}

.card-face {
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    border-radius: 24px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    box-shadow:
        0 40px 80px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    padding: 0;
    display: flex;
    flex-direction: row;
    overflow: hidden;
}

.card-brand {
    flex: 0 0 45%;
    padding: 3.5rem 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    position: relative;
    background: rgba(0, 0, 0, 0.15);
}

.card-form-wrapper {
    flex: 1;
    padding: 3.5rem 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
}

.card-front {
    position: relative;
}

.card-back {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    transform: rotateY(180deg);
}

/* ========== IMAGE COVER (LEFT PANEL) ========== */
.card-brand.image-cover {
    padding: 0; /* Override the 3.5rem padding */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    border-radius: 24px 0 0 24px;
}

.cover-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15, 12, 41, 0.2) 0%, rgba(15, 12, 41, 0.95) 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 3rem;
    border-radius: 24px 0 0 24px;
}

.cover-overlay.reset-overlay {
    background: linear-gradient(180deg, rgba(6, 182, 212, 0.2) 0%, rgba(15, 12, 41, 0.95) 100%);
}

.overlay-content {
    animation: slideUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.3s both;
}

.overlay-icon {
    width: 48px; height: 48px;
    border-radius: 14px;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.25rem; color: #fff;
    margin-bottom: 1rem;
    border: 1px solid rgba(255,255,255,0.2);
}

.overlay-content h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.3rem;
    letter-spacing: -0.3px;
}

.overlay-content p {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.6);
}

/* ========== FORM HEADER (RIGHT PANEL) ========== */
.form-header-main {
    margin-bottom: 2rem;
    animation: slideUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.1s both;
}

.form-header-main .form-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.5px;
    margin-bottom: 0.4rem;
}

.form-header-main .form-subtitle {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

/* ========== FORM ELEMENTS ========== */
.form-group {
    margin-bottom: 1.25rem;
    animation: slideUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.form-group:nth-child(1) { animation-delay: 0.4s; }
.form-group:nth-child(2) { animation-delay: 0.5s; }

.form-group label {
    display: block;
    font-size: 0.72rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

.input-wrap {
    position: relative;
}

.input-wrap i.input-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.9rem;
    transition: color 0.3s, text-shadow 0.3s;
    z-index: 2;
}

.input-wrap input {
    width: 100%;
    padding: 0.9rem 1rem 0.9rem 2.8rem;
    background: rgba(255, 255, 255, 0.06);
    border: 1.5px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    color: var(--text-primary);
    font-size: 0.92rem;
    font-family: 'Inter', 'Poppins', sans-serif;
    outline: none;
    transition: all 0.35s ease;
}
.input-wrap input::placeholder {
    color: rgba(255, 255, 255, 0.25);
    font-weight: 300;
}
.input-wrap input:focus {
    border-color: var(--accent);
    background: rgba(129, 140, 248, 0.08);
    box-shadow: 0 0 0 4px var(--accent-glow), 0 0 20px rgba(129, 140, 248, 0.15);
}
.input-wrap input:focus ~ .input-icon,
.input-wrap input:focus + .input-icon {
    color: var(--accent);
    text-shadow: 0 0 12px var(--accent-glow);
}

.password-toggle-btn {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.95rem;
    padding: 4px;
    transition: color 0.2s;
    z-index: 2;
}
.password-toggle-btn:hover { color: var(--accent); }

/* ========== FORM OPTIONS ========== */
.form-options {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 1.5rem;
    animation: slideUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.55s both;
}
.forgot-link {
    font-size: 0.8rem;
    color: var(--accent);
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
    position: relative;
}
.forgot-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1.5px;
    background: var(--accent);
    transition: width 0.3s;
}
.forgot-link:hover::after { width: 100%; }
.forgot-link:hover { color: #a5b4fc; }

/* ========== BUTTONS ========== */
.btn-aurora {
    width: 100%;
    padding: 0.95rem;
    border: none;
    border-radius: 14px;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: 'Inter', 'Poppins', sans-serif;
    cursor: pointer;
    color: #fff;
    background: linear-gradient(135deg, var(--aurora-1), var(--aurora-2), var(--aurora-3));
    background-size: 300% 300%;
    animation: slideUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.6s both, btnGradient 6s ease infinite;
    box-shadow: 0 8px 30px rgba(99, 102, 241, 0.35);
    position: relative;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}

@keyframes btnGradient {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.btn-aurora::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.6s;
}
.btn-aurora:hover::before { left: 100%; }
.btn-aurora:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 40px rgba(99, 102, 241, 0.5);
}
.btn-aurora:active { transform: translateY(0); }
.btn-aurora span { position: relative; z-index: 1; }

.btn-reset {
    width: 100%;
    padding: 0.95rem;
    border: none;
    border-radius: 14px;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: 'Inter', 'Poppins', sans-serif;
    cursor: pointer;
    color: #fff;
    background: linear-gradient(135deg, var(--aurora-3), var(--aurora-4));
    background-size: 200% 200%;
    animation: btnGradient 5s ease infinite;
    box-shadow: 0 8px 30px rgba(6, 182, 212, 0.3);
    position: relative;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}
.btn-reset::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.6s;
}
.btn-reset:hover::before { left: 100%; }
.btn-reset:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 40px rgba(6, 182, 212, 0.45);
}

.btn-back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.82rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 0.55rem 1.1rem;
    cursor: pointer;
    transition: all 0.25s;
    font-family: 'Inter', 'Poppins', sans-serif;
    margin-bottom: 1.5rem;
}
.btn-back-link:hover {
    background: rgba(255, 255, 255, 0.12);
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.2);
}

/* ========== FOOTER & WHATSAPP BUTTON ========== */
.login-footer {
    text-align: center;
    margin-top: 1.75rem;
    animation: slideUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.7s both;
    position: relative;
}

.footer-help-text {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 0.8rem;
}

.btn-whatsapp {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.85rem;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: 'Inter', 'Poppins', sans-serif;
    color: #fff !important;
    background: linear-gradient(135deg, #25D366, #128C7E);
    text-decoration: none !important;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.25);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    animation: pulseWhatsapp 2s infinite;
}

.btn-whatsapp::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: shimmerWhatsapp 2.5s infinite;
}

.btn-whatsapp:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(37, 211, 102, 0.45);
}

.btn-whatsapp i {
    font-size: 1.15rem;
}

@keyframes pulseWhatsapp {
    0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.5); }
    70% { box-shadow: 0 0 0 12px rgba(37, 211, 102, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

@keyframes shimmerWhatsapp {
    0% { left: -100%; }
    100% { left: 100%; }
}

.divider-line {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin: 1.5rem 0;
    color: rgba(255, 255, 255, 0.25);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}
.divider-line::before, .divider-line::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
}

/* ========== ALERTS ========== */
.alert-msg {
    padding: 0.8rem 1rem;
    border-radius: 12px;
    font-size: 0.82rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 1.25rem;
    animation: alertPop 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes alertPop {
    from { opacity: 0; transform: translateY(-8px) scale(0.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
.alert-msg.error {
    background: rgba(248, 113, 113, 0.12);
    color: var(--danger);
    border: 1px solid rgba(248, 113, 113, 0.2);
}
.alert-msg.success {
    background: rgba(52, 211, 153, 0.12);
    color: var(--success);
    border: 1px solid rgba(52, 211, 153, 0.2);
}

/* ========== SIGNATURE ========== */
.sig-wrapper {
    position: fixed;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 20;
}
.sig-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 16px;
    border-radius: 50px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
    text-decoration: none;
    transition: all 0.3s;
}
.sig-link:hover {
    background: rgba(0, 0, 0, 0.5);
    border-color: rgba(129, 140, 248, 0.3);
    transform: translateY(-2px);
}
.sig-link svg { width: 14px; height: 14px; stroke: rgba(255,255,255,0.4); }
.sig-link:hover svg { stroke: var(--accent); }
.sig-brand-text {
    font-size: 12px;
    font-weight: 700;
    background: linear-gradient(90deg, #fff, var(--accent), #fff);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shimmerText 3s linear infinite;
}
.sig-sub-text {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.4);
    font-weight: 300;
}
@keyframes shimmerText { to { background-position: 200% center; } }

/* ========== STAGGERED ENTRANCE ========== */
@keyframes slideUp {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Card entrance */
.login-container {
    animation: cardFloat 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes cardFloat {
    from { opacity: 0; transform: translateY(50px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ========== RESPONSIVE ========== */
@media (max-width: 850px) {
    .card-face {
        flex-direction: column;
    }
    .card-brand {
        display: none; /* Hide left brand image on smaller screens */
    }
    .form-header-main {
        text-align: center;
    }
    .card-form-wrapper {
        padding: 2.5rem 2rem;
    }
}

@media (max-width: 600px) {
    body { padding: 1rem; }
    .login-container { max-width: 100%; }
    .card-form-wrapper { padding: 2.5rem 1.5rem 1.5rem; }
    .form-header-main .form-title { font-size: 1.5rem; }
    .aurora-bg { filter: blur(60px) saturate(1.3); }
}

@media (max-width: 380px) {
    .card-form-wrapper { padding: 1.5rem 1.2rem 1.2rem; }
}
