/* login.css - Giriş ve Kayıt Formu Stilleri */

/* Ana Sahne ve Döndürme Kapsayıcısı */
.scene {
    perspective: 1000px;
    display: flex;
    justify-content: center;
    /* align-items: center; kaldırıldı */
    min-height: calc(100vh - 80px); /* Header yüksekliğini çıkar */
    padding: 20px;
    padding-top: 100px; /* Formu üstten biraz aşağı almak için */
}

.form-flipper {
    position: relative;
    width: 100%;
    max-width: 420px;
    height: auto; /* Yüksekliği otomatik ayarla */
    transition: transform 0.8s;
    transform-style: preserve-3d;
}

.form-flipper.is-flipped {
    transform: rotateY(180deg);
}

/* Formların Genel Stili */
.form-container {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden; /* Safari */
    backface-visibility: hidden;
    background-color: var(--color-400);
    padding: 40px;
    border-radius: 10px;
    margin-left: -40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    /* justify-content: center; kaldırıldı */
}

.form-front {
    height: 450px; /* Giriş formu için sabit yükseklik */
}

.form-back {
    transform: rotateY(180deg);
    height: 700px; /* Kayıt formu için daha uzun yükseklik */
}

h2 {
    color: #fff;
    text-align: center;
    margin-bottom: 30px;
    font-family: 'Jost', sans-serif;
    font-weight: 900;
}

.input-group {
    position: relative;
    margin-bottom: 20px;
}

.input-group i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-420);
}

.input-group input {
    width: 100%;
    padding: 15px 15px 15px 45px;
    background-color: var(--color-390);
    border: 1px solid var(--color-410);
    border-radius: 5px;
    color: #fff;
    font-family: 'Manrope', sans-serif;
    font-size: 16px;
    box-sizing: border-box; /* Padding'in genişliği etkilememesi için */
    transition: border-color 0.3s, box-shadow 0.3s;
}

.toast-stack {
    position: fixed;
    top: 100px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    pointer-events: none;
    z-index: 1000;
}

.toast {
    min-width: 320px;
    max-width: 420px;
    background: rgba(16, 19, 29, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    box-shadow: 0 14px 35px rgba(0, 0, 0, 0.45);
    transform: translateY(-140%);
    opacity: 0;
    pointer-events: auto;
}

.toast.show {
    animation: toast-slide-in 0.35s ease forwards;
}

.toast.hide {
    animation: toast-slide-out 0.3s ease forwards;
}

.toast-body {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 14px 16px;
}

.toast-icon {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    font-size: 18px;
}

.toast.success .toast-icon { color: #34d399; }
.toast.error .toast-icon { color: #f87171; }

.toast-text {
    flex: 1;
    color: #e5e7eb;
}

.toast-text strong {
    display: block;
    font-family: 'Jost', sans-serif;
    letter-spacing: 0.2px;
}

.toast-text p {
    margin: 4px 0 0;
    color: #cbd5e1;
    font-size: 14px;
}

.toast-close {
    background: none;
    border: none;
    color: #9ca3af;
    font-size: 20px;
    cursor: pointer;
    padding: 4px 6px;
    line-height: 1;
    transition: color 0.2s ease;
}

.toast-close:hover { color: #fff; }

@keyframes toast-slide-in {
    from { transform: translateY(-140%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes toast-slide-out {
    from { transform: translateY(0); opacity: 1; }
    to { transform: translateY(-140%); opacity: 0; }
}

.input-group input:focus {
    outline: none;
    border-color: var(--color-300);
    box-shadow: 0 0 10px rgba(240, 89, 65, 0.3);
}

.submit-btn {
    width: 100%;
    padding: 15px;
    font-family: 'Jost', sans-serif;
    font-size: 18px;
    font-weight: bold;
    color: #fff;
    background-image: linear-gradient(to right, var(--color-300), var(--color-320) 120%);
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px; /* Üstteki elemanla boşluk */
}

.submit-btn:disabled {
    background-image: none;
    background-color: var(--color-410);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.submit-btn:disabled:hover {
    background-color: var(--color-410);
}

.submit-btn:hover {
    background-image: none;
    background-color: var(--color-320);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.form-links {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
}

.form-links a, .form-links-bottom a {
    color: var(--color-420);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s;
}

.form-links a:hover, .form-links-bottom a:hover {
    color: var(--color-300);
}

.form-links-bottom {
    text-align: center;
    display: block;
    margin-top: 20px;
    font-size: 14px;
    color: var(--color-420);
}

.placeholder-link {
    color: var(--color-410) !important;
    cursor: not-allowed;
}

/* Şifre Gücü ve Eşleşme Stilleri */
#password-strength-feedback {
    margin-top: -10px; /* Input ile arasındaki boşluğu azalt */
    margin-bottom: 15px; /* Butonla arasında boşluk bırak */
}

#password-strength-feedback ul {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 13px;
    color: var(--color-420);
}

#password-strength-feedback ul li {
    padding: 2px 0;
    transition: color 0.3s;
    color: #dc3545; /* Varsayılan olarak kırmızı (invalid) */
}

#password-strength-feedback ul li.valid {
    color: #28a745; /* Yeşil renk */
}

#password-strength-feedback ul li::before {
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    margin-right: 8px;
    content: '\f00d'; /* Varsayılan olarak Times icon (X) */
}

#password-strength-feedback ul li.valid::before {
    content: '\f00c'; /* Check icon (✓) */
}

.steam-btn {
    display: flex; /* İkon ve metni hizalamak için */
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 15px;
    font-family: 'Jost', sans-serif;
    font-size: 18px;
    color: #fff;
    background-color: #1b2838;
    border: 1px solid #2a475e;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
    margin-bottom: 20px; /* Diğer inputlarla boşluk */
    text-decoration: none; /* a etiketinden gelen alt çizgiyi kaldır */
    box-sizing: border-box;
}

.steam-btn:hover {
    background-color: #2a475e;
}

/* Steam bağlantısı yapıldığında butonun stili */
.steam-btn.connected {
    background-color: #2a9d8f !important; /* Yeşil tonu */
    border-color: #264653;
    cursor: default;
}

.steam-btn.connected:hover {
    transform: none;
    background-color: #2a9d8f !important;
}

.steam-btn i {
    margin-right: 10px;
}

/* Steam Kullanıcı Bilgisi Stilleri */
.steam-user-info {
    display: flex;
    align-items: center;
    background-color: var(--color-390);
    border: 1px solid var(--color-410);
    border-radius: 5px;
    padding: 10px;
    margin-bottom: 20px;
}

.steam-user-info .avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    margin-right: 15px;
}

.steam-user-info .user-details {
    display: flex;
    flex-direction: column;
}

.steam-user-info .username {
    color: #fff;
    font-weight: bold;
}

.steam-user-info .change-account {
    font-size: 12px;
    color: var(--color-420);
    text-decoration: none;
}

.steam-user-info .change-account:hover {
    color: var(--color-300);
}

/* Şifremi unuttum modalı */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
    z-index: 1200;
    padding: 20px;
}

.modal-backdrop.show {
    opacity: 1;
    visibility: visible;
}

.modal-card {
    background: var(--color-400);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 28px;
    width: 100%;
    max-width: 420px;
    position: relative;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.45);
    transform: translateY(12px);
    animation: modal-pop 0.3s ease forwards;
}

.modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: transparent;
    color: #fff;
    border: none;
    font-size: 22px;
    cursor: pointer;
}

.modal-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-300), var(--color-320));
    display: grid;
    place-items: center;
    margin: 0 auto 14px;
    color: #0e0f16;
    font-size: 24px;
}

.modal-card h3 {
    text-align: center;
    margin: 6px 0 8px;
    color: #fff;
    font-family: 'Jost', sans-serif;
}

.modal-desc {
    color: var(--color-420);
    text-align: center;
    margin-bottom: 16px;
    line-height: 1.5;
}

.modal-feedback {
    min-height: 22px;
    margin: 6px 0 4px;
    font-size: 14px;
    color: var(--color-420);
}

.modal-feedback.success {
    color: #34d399;
}

.modal-feedback.error {
    color: #f87171;
}

#forgot-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-spinner {
    display: none;
}

.is-loading .btn-label {
    opacity: 0.7;
}

.is-loading .btn-spinner {
    display: inline-block;
    animation: spin 1s linear infinite;
}

@keyframes modal-pop {
    from { opacity: 0; transform: translateY(20px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
