@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Caveat:wght@600;700&display=swap');

:root {
    --bg-gradient-1: #06050b;
    --bg-gradient-2: #0a0915;
    --primary: #EF4444;
    --primary-hover: #dc2626;
    --success: #10b981;
    --danger: #b91c1c;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --glass-bg: rgba(20, 18, 30, 0.6);
    --glass-border: rgba(255, 255, 255, 0.08);
    --input-bg: rgba(10, 9, 21, 0.8);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background: var(--bg-gradient-2);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Çizgisel Network Animasyonu İçin Canvas */
#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    pointer-events: none;
}

/* Index (Login) */
.index-body {
    overflow: hidden;
    height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.auth-container {
    background: rgba(15, 13, 25, 0.65);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.05); /* Yumuşatılmış sınır */
    border-top: 1px solid rgba(255, 255, 255, 0.1); /* Üst parlama vuruntusu */
    padding: 3.5rem 2.5rem;
    border-radius: 24px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    animation: fadeInFly 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
    opacity: 0;
    transform: translateY(30px);
}

@keyframes fadeInFly {
    to { opacity: 1; transform: translateY(0); }
}

.auth-logo {
    text-align: center;
    margin-bottom: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.logo-wrapper {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 140px;
    height: 140px;
}

.moving-shield {
    width: 100px; /* Biraz daha büyütüldü */
    height: 100px;
    stroke: var(--success);
    fill: rgba(16, 185, 129, 0.15);
    filter: drop-shadow(0 0 15px rgba(16, 185, 129, 0.4));
    animation: shieldTechPulse 4s cubic-bezier(0.4, 0, 0.2, 1) infinite;
    transform-origin: center center;
    z-index: 5;
}

/* Uçuşan Medya ve Uygulama İkonları Efekti (Chaos Swarm) */
.flying-icon {
    position: absolute;
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.4rem;
    filter: drop-shadow(0 0 5px currentColor);
    /* Başlangıçta tam kalkan arkasında, oradan uçuşa dağılacaklar */
    top: 50%; left: 50%;
    margin-top: -0.7rem; margin-left: -0.7rem;
    z-index: 2;
    opacity: 0.8;
}

.icon-1 { animation: float1 4s infinite ease-in-out; color: #E1306C; } /* Insta */
.icon-2 { animation: float2 5s infinite ease-in-out -1s; color: #1877F2; } /* FB */
.icon-3 { animation: float3 4.5s infinite ease-in-out -2s; color: #fff; } /* TikTok */
.icon-4 { animation: float4 5.5s infinite ease-in-out -3s; color: #EA4335; } /* Google */
.icon-5 { animation: float5 6s infinite ease-in-out -1.5s; color: #FC3F1D; } /* Yandex */
.icon-6 { animation: float6 4.8s infinite ease-in-out -4s; color: #00A4EF; } /* Microsoft */

/* Daha Sade Uçma (Salınım) Efektleri - Kalkan etrafında hafifçe süzülme */
@keyframes float1 { 0%, 100% { transform: translate(55px, -45px); } 50% { transform: translate(50px, -55px); } }
@keyframes float2 { 0%, 100% { transform: translate(-50px, 45px); } 50% { transform: translate(-45px, 55px); } }
@keyframes float3 { 0%, 100% { transform: translate(-65px, -35px); } 50% { transform: translate(-55px, -45px); } }
@keyframes float4 { 0%, 100% { transform: translate(45px, 50px); } 50% { transform: translate(55px, 40px); } }
@keyframes float5 { 0%, 100% { transform: translate(0px, -70px); } 50% { transform: translate(0px, -60px); } }
@keyframes float6 { 0%, 100% { transform: translate(-65px, 10px); } 50% { transform: translate(-75px, 0px); } }

@keyframes shieldTechPulse {
    0% { transform: translateY(0) scale(1) rotate(0deg); filter: drop-shadow(0 0 10px rgba(16, 185, 129, 0.4)); }
    25% { transform: translateY(-4px) scale(1.02) rotate(-6deg); filter: drop-shadow(0 0 15px rgba(16, 185, 129, 0.6)); }
    50% { transform: translateY(-8px) scale(1.05) rotate(0deg); filter: drop-shadow(0 0 30px rgba(16, 185, 129, 0.9)); }
    75% { transform: translateY(-4px) scale(1.02) rotate(6deg); filter: drop-shadow(0 0 15px rgba(16, 185, 129, 0.6)); }
    100% { transform: translateY(0) scale(1) rotate(0deg); filter: drop-shadow(0 0 10px rgba(16, 185, 129, 0.4)); }
}

.logo-text {
    font-family: 'Caveat', cursive;
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: #ffffff;
    text-shadow: 0 4px 15px rgba(255, 255, 255, 0.15);
    margin-top: -10px;
}

.auth-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 2.5rem;
    position: relative;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.auth-tab {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 0.9rem; /* Biraz küçültüldü */
    font-weight: 600;
    padding: 0.85rem 0;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
}

.auth-tab::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--primary);
    transform: scaleX(0);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 3px 3px 0 0;
}

.auth-tab.active {
    color: #fff;
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
}

.auth-tab.active::after {
    transform: scaleX(1);
    box-shadow: 0 -3px 15px rgba(239, 68, 68, 0.6);
}

.auth-form {
    display: none;
    flex-direction: column;
    gap: 1.25rem;
    animation: fadeInForm 0.4s ease;
}

.auth-form.active {
    display: flex;
}

@keyframes fadeInForm {
    from { opacity: 0; transform: translateX(-10px); }
    to { opacity: 1; transform: translateX(0); }
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-muted);
    opacity: 0.75;
    margin-left: 6px;
    letter-spacing: 0.4px;
}

.form-group input {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-top: 1px solid rgba(0, 0, 0, 0.4);
    padding: 0.85rem 1rem;
    border-radius: 12px;
    color: #fff;
    font-size: 0.95rem;
    outline: none;
    transition: all 0.3s ease;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.3);
}

.form-group input::placeholder {
    color: rgba(255, 255, 255, 0.2);
}

.form-group input:focus {
    border-color: rgba(239, 68, 68, 0.4);
    background: rgba(10, 9, 21, 0.8);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2), 0 0 0 4px rgba(239, 68, 68, 0.08);
}

.btn-primary {
    background: rgba(15, 13, 25, 0.8); /* Koyu Arka Plan */
    color: #ef4444; /* Neon Kırmızı Yazı */
    border: 1px solid rgba(239, 68, 68, 0.5); /* Kırmızı Çerçeve */
    padding: 0.75rem 2.5rem; /* Hem Yükseklik hem Genişlik Küçültüldü */
    border-radius: 12px;
    font-size: 0.9rem; /* Yazı İyice Küçültüldü */
    font-weight: 600;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-top: 1rem;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.1), inset 0 0 10px rgba(239, 68, 68, 0.05);
    text-transform: uppercase;
    align-self: center; /* 100% Genişlemeyi Önler - Ortalar */
    min-width: 180px; /* Çok küçülmesini engeller */
}

.btn-primary:hover {
    background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%); /* İçi kırmızı dolar */
    color: white; /* Yazı bembeyaz olur */
    border-color: transparent;
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 10px 25px -5px rgba(239, 68, 68, 0.6), inset 0 1px 1px rgba(255, 255, 255, 0.3);
}

.btn-primary:active {
    transform: translateY(1px) scale(0.98);
    box-shadow: 0 4px 10px rgba(239, 68, 68, 0.4);
}

/* Panel Styles */
.panel-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2.5rem 2rem;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
    padding: 1.5rem 2rem;
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
}

.logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.logo .logo-text {
    font-size: 1.5rem;
    margin-top: -5px;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

@media (max-width: 768px) {
    .grid { grid-template-columns: 1fr; }
    .panel-header { flex-direction: column; gap: 1rem; text-align: center; }
    .card { padding: 1.5rem; border-radius: 18px; }
    .card-title { font-size: 1.15rem; }
    .list-item { flex-direction: column; align-items: stretch; gap: 1rem; padding: 1rem; }
    .item-info { width: 100%; }
    .item-actions { justify-content: flex-end; }
}

.card {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 2.5rem;
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.4);
    position: relative;
    overflow: hidden;
    transform-style: preserve-3d;
    will-change: transform;
}

.card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--success));
    transform: translateZ(20px);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    transform: translateZ(30px);
}

.card-title {
    font-size: 1.35rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.list-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-height: 500px;
    overflow-y: auto;
    padding-right: 0.5rem;
    transform: translateZ(10px);
}

.list-container::-webkit-scrollbar { width: 6px; }
.list-container::-webkit-scrollbar-track { background: transparent; }
.list-container::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 10px; }

.list-item {
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    opacity: 0;
    transform: translateY(20px);
    animation: revealList 0.5s forwards;
}

@keyframes revealList {
    to { opacity: 1; transform: translateY(0); }
}

.list-item:hover {
    transform: translateY(-3px) scale(1.01);
    background: rgba(15, 23, 42, 0.8);
    border-color: rgba(255,255,255,0.15);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

.item-info { width: 70%; word-break: break-all; }
.item-info h4 { margin-bottom: 0.35rem; font-size: 1.1rem; color: #fff; }
.item-info p { color: var(--text-muted); font-size: 0.85rem; display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.25rem;}
.item-info .totp-code { font-size: 1.8rem; font-weight: 700; color: var(--success); letter-spacing: 4px; font-family: monospace; margin-top: 0.5rem; }

.item-actions { display: flex; gap: 0.5rem; }

.btn-icon, .btn-small {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    padding: 0.6rem 1rem;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-icon { padding: 0.6rem; }

.btn-small:hover, .btn-icon:hover {
    background: rgba(255, 255, 255, 0.1);
}

.btn-danger { background: rgba(239, 68, 68, 0.1); color: var(--danger); border-color: rgba(239, 68, 68, 0.2); }
.btn-danger:hover { background: rgba(239, 68, 68, 0.2); color: #fff; }

.btn-success { background: rgba(16, 185, 129, 0.1); color: var(--success); border-color: rgba(16, 185, 129, 0.2); }
.btn-success:hover { background: rgba(16, 185, 129, 0.2); color: #fff; }

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.modal.active { display: flex; opacity: 1; }

.modal-content {
    background: var(--bg-gradient-2);
    border: 1px solid var(--glass-border);
    padding: 2.5rem;
    border-radius: 24px;
    width: 100%;
    max-width: 500px;
    transform: scale(0.95);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.6);
}

.modal.active .modal-content { transform: scale(1); }

.modal-header {
    display: flex; justify-content: space-between; align-items: center; margin-bottom: 2rem;
}

.modal-header h3 { font-size: 1.4rem; font-weight: 600; }

.close-modal {
    background: rgba(255,255,255,0.05); border: 1px solid var(--glass-border); border-radius: 50%;
    color: var(--text-muted); width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all 0.2s;
}
.close-modal:hover { background: rgba(255,255,255,0.1); color: white; transform: rotate(90deg); }

/* Toast */
.toast {
    position: fixed; top: 20px; right: 20px;
    padding: 1rem 1.5rem;
    border-radius: 14px;
    background: var(--glass-bg); border: 1px solid var(--glass-border);
    color: white; backdrop-filter: blur(16px);
    transform: translateX(120%); transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 9999;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    display: flex; align-items: center; gap: 0.75rem;
    font-weight: 500;
}
.toast.show { transform: translateX(0); }
.toast.success { border-left: 4px solid var(--success); }
.toast.error { border-left: 4px solid var(--primary); }

/* OTP Modal Modern UI */
.otp-modal-content {
    max-width: 420px !important;
    padding: 3rem 2.5rem !important;
    background: rgba(10, 8, 20, 0.98) !important;
    border: 1px solid rgba(239, 68, 68, 0.2) !important;
    box-shadow: 0 25px 50px rgba(0,0,0,0.9), inset 0 0 0 1px rgba(255,255,255,0.05) !important;
    border-radius: 24px !important;
}

.otp-input-group {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 2.5rem 0 0.5rem 0;
}

.otp-digit {
    width: 60px;
    height: 75px;
    background: rgba(255, 255, 255, 0.02);
    border: 2px solid rgba(239, 68, 68, 0.2);
    border-radius: 16px;
    color: white;
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: inset 0 4px 15px rgba(0,0,0,0.5);
    font-family: monospace;
}

.otp-digit:focus {
    outline: none;
    background: rgba(239, 68, 68, 0.05);
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: 0 10px 25px -5px rgba(239, 68, 68, 0.5), inset 0 4px 10px rgba(0,0,0,0.5);
}

.otp-digit.filled {
    border-color: rgba(239, 68, 68, 0.6);
}

@media (max-width: 480px) {
    .toast { left: 1rem; right: 1rem; width: auto; font-size: 0.9rem; transform: translateY(-150%); bottom: auto; top: 1rem; }
    .toast.show { transform: translateY(0); }
    
    .auth-container { 
        padding: 2rem 1.5rem; 
        border-radius: 24px; 
        box-shadow: 0 15px 40px rgba(0, 0, 0, 0.8);
        width: 92%; 
        max-width: 360px;
    }
    
    .logo-container h1 { font-size: 1.9rem; margin-top: -0.5rem; }
    .moving-shield { width: 85px; height: 85px; }
    .auth-tab { font-size: 0.85rem; padding: 0.75rem 0; }
    
    .btn-primary { 
        align-self: stretch; 
        width: 100%; 
        padding: 0.85rem; 
        font-size: 0.95rem; 
        margin-top: 1.5rem; 
    }
    
    .form-group label { font-size: 0.8rem; margin-bottom: 0.4rem; }
    .form-group input { padding: 0.8rem 1rem; font-size: 0.9rem; }
    
    .modal-content { padding: 1.5rem; border-radius: 20px; width: 95%; max-width: 350px !important; }
    .otp-digit { width: 50px; height: 60px; font-size: 2rem; }
    
    .panel-container { padding: 1.5rem 1rem; }
}
