/* ===== GOOGLE FONTS & BOXICONS ===== */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');
@import url('https://unpkg.com/boxicons@2.1.4/css/boxicons.min.css');

:root {
    --primary-color: #00d9ff;
    --accent-color: #e900ff;
    --secondary-color: #1c1c1c;
    --container-color: #2b2b2b;
    --text-color: #f0f0f0;
    --body-font: 'Poppins', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: var(--secondary-color);
    font-family: var(--body-font);
}

#plexus-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

/* ANA KUTU - Kapalı hali (Varsayılan) */
.login-box {
    position: relative;
    width: 380px;
    height: 100px; /* Kapalıyken sadece başlık görünür */
    background: #1c1c1c;
    border-radius: 20px;
    overflow: hidden;
    transition: height 0.5s ease, width 0.5s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column; /* İçerik alt alta dizilsin */
    filter: drop-shadow(0 15px 50px #000);
}

/* AÇIK HALİ (Hover veya force-open sınıfı varsa) */
.login-box:hover,
.login-box.force-open {
    width: 450px;
    height: 600px; /* Açılınca form sığacak kadar büyür */
}

/* Kayıt formu açıkken biraz daha uzun olsun */
.login-box.show-register:hover,
.login-box.show-register.force-open {
    height: 680px;
}

/* KAPALI DURUM BAŞLIĞI (LOGIN <3) */
.closed-title {
    position: absolute; /* Ortada sabit kalsın */
    color: #fff;
    font-size: 2em;
    font-weight: 600;
    letter-spacing: 0.1em;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-shadow: 0 0 10px var(--primary-color), 0 0 20px var(--accent-color);
    transition: opacity 0.5s, transform 0.5s;
    z-index: 10;
}
.closed-title i { color: var(--primary-color); }
.closed-title i:last-of-type { color: var(--accent-color); }

/* Kutu açılınca başlık kaybolsun */
.login-box:hover .closed-title,
.login-box.force-open .closed-title {
    opacity: 0;
    transform: scale(0);
}

/* FORM İÇERİĞİ */
.form-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 40px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
    transition-delay: 0.3s;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Kutu açılınca form görünür olsun */
.login-box:hover .form-content,
.login-box.force-open .form-content {
    opacity: 1;
    pointer-events: auto;
}

.auth-form {
    display: none; /* Varsayılan gizli */
    width: 100%;
    flex-direction: column;
    align-items: center;
}

.login-form {
    display: flex; /* Login varsayılan açık */
}

/* Form geçişleri */
.login-box.show-register .login-form {
    display: none;
}
.login-box.show-register .register-form {
    display: flex;
}

.auth-title {
    font-size: 1.8em;
    color: var(--text-color);
    margin-bottom: 20px;
    margin-top: 20px;
}

.input-group {
    position: relative;
    width: 100%;
    margin-bottom: 30px;
}
.input-group input {
    width: 100%;
    padding: 10px;
    background: transparent;
    border: none;
    border-bottom: 2px solid #fff;
    outline: none;
    color: #fff;
    font-size: 1em;
}
.input-group label {
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.5);
    pointer-events: none;
    transition: .5s;
}
.input-group input:focus ~ label,
.input-group input:valid ~ label {
    top: -20px;
    font-size: 0.8em;
    color: var(--primary-color);
}

.auth-button {
    width: 100%;
    padding: 12px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    border: none;
    border-radius: 8px;
    color: #fff;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
}
.auth-button:hover {
    filter: brightness(1.2);
}

.toggle-link, .social-login {
    margin-top: 20px;
    color: rgba(255, 255, 255, 0.7);
    text-align: center;
}
.toggle-link a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}
.social-login p { margin-bottom: 15px; }
.google-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    background: #4285F4;
    color: #fff;
    border-radius: 8px;
    text-decoration: none;
    transition: 0.3s;
}
.google-btn:hover { background: #357ae8; }
.google-btn i { font-size: 1.5em; }

/* HAREKETLİ IŞIK ÇİZGİLERİ */
.line {
    position: absolute;
    background: var(--primary-color);
    box-shadow: 0 0 10px var(--primary-color), 0 0 20px var(--primary-color), 0 0 40px var(--primary-color);
    opacity: 0;
    transition: opacity 0.5s;
}
.login-box:hover .line,
.login-box.force-open .line {
    opacity: 1;
}

.line-top { top: 0; left: -100%; width: 100%; height: 4px; animation: animate-top 4s linear infinite; }
@keyframes animate-top { 0% { left: -100%; } 100% { left: 100%; } }

.line-right { top: -100%; right: 0; width: 4px; height: 100%; animation: animate-right 4s linear infinite; animation-delay: 1s; }
@keyframes animate-right { 0% { top: -100%; } 100% { top: 100%; } }

.line-bottom { bottom: 0; right: -100%; width: 100%; height: 4px; animation: animate-bottom 4s linear infinite; animation-delay: 2s; }
@keyframes animate-bottom { 0% { right: -100%; } 100% { right: 100%; } }

.line-left { bottom: -100%; left: 0; width: 4px; height: 100%; animation: animate-left 4s linear infinite; animation-delay: 3s; }
@keyframes animate-left { 0% { bottom: -100%; } 100% { bottom: 100%; } }

/* İkinci Renk (Pembe) Çizgiler */
.line::before {
    content: '';
    position: absolute;
    background: var(--accent-color);
    box-shadow: 0 0 10px var(--accent-color), 0 0 20px var(--accent-color), 0 0 40px var(--accent-color);
}
.line-top::before { top: 0; left: 0; width: 100%; height: 100%; animation: animate-top 4s linear infinite; animation-delay: 2s; }
.line-right::before { top: 0; right: 0; width: 100%; height: 100%; animation: animate-right 4s linear infinite; animation-delay: 3s; }
.line-bottom::before { bottom: 0; right: 0; width: 100%; height: 100%; animation: animate-bottom 4s linear infinite; animation-delay: 0s; }
.line-left::before { bottom: 0; left: 0; width: 100%; height: 100%; animation: animate-left 4s linear infinite; animation-delay: 1s; }

/* MESAJ KUTUSU (Hata/Başarı) */
.auth-message {
    position: absolute;
    bottom: 20px; /* En alta sabitle */
    width: 80%;
    padding: 10px;
    text-align: center;
    border-radius: 8px;
    font-size: 0.85rem;
    z-index: 100;
    opacity: 0;
    transition: opacity 0.3s;
    background: rgba(0,0,0,0.9); /* Okunabilirlik için koyu arka plan */
}

.auth-message.error {
    color: #ff4d4d;
    border: 1px solid #ff4d4d;
}

.auth-message.success {
    color: #00ff88;
    border: 1px solid #00ff88;
}

.login-box:hover .auth-message,
.login-box.force-open .auth-message {
    opacity: 1;
}