/* Variabel Warna */
:root {
    --primary-color: #6d5dfc;
    --bg-dark: #13131a;
    --card-bg: #1a1a24;
    --text-white: #ffffff;
    --text-grey: #a0a0ab;
    --input-bg: rgba(255, 255, 255, 0.05);
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-white);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

/* Container Utama */
.auth-container {
    display: flex;
    width: 100%;
    max-width: 1000px;
    background-color: var(--card-bg);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

/* Sisi Hero (Gambar) */
.auth-hero {
    flex: 1.2;
    position: relative;
    background: url('/assets/images/baground.webp') center/cover no-repeat;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 600px;
}

/* Overlay agar teks di atas gambar terbaca (Shadow Overlay) */
.auth-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.2) 0%, rgba(0,0,0,0.8) 100%);
    z-index: 1;
}

.auth-hero > * {
    position: relative;
    z-index: 2;
}

.auth-logo {
    display: flex;
    align-items: center;
    font-size: 1.2rem;
}

.logo-img {
    height: 45px;
    width: auto;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.logo-img:hover {
    transform: scale(1.05);
}

.hero-text h2 {
    font-size: 2rem;
    line-height: 1.3;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
    transition: opacity 0.5s ease-in-out;
}

.carousel-indicators {
    display: flex;
    gap: 8px;
    margin-top: 20px;
}

.dot {
    height: 4px;
    width: 20px;
    background: rgba(255,255,255,0.3);
    border-radius: 2px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.dot.active {
    background: var(--text-white);
}

.back-link {
    color: var(--text-white);
    text-decoration: none;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 0.8;
    transition: 0.3s;
}

.back-link:hover { opacity: 1; }

/* Sisi Form */
.auth-form-section {
    flex: 1;
    padding: 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.form-header {
    margin-bottom: 30px;
}

.form-header h2 {
    font-size: 2rem;
    margin-bottom: 8px;
}

.form-header p {
    color: var(--text-grey);
    font-size: 0.95rem;
}

.form-header a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

/* Container untuk input dan label */
.input-box {
    position: relative;
    width: 100%;
    margin-bottom: 25px;
}

.input-control {
    width: 100%;
    background: rgba(255, 255, 255, 0.05) !important; /* Jangan transparan agar teks terlihat */
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 15px 16px;
    border-radius: 10px;
    color: #ffffff; /* Pastikan warna teks putih */
    font-size: 1rem;
    outline: none;
    transition: all 0.3s;
}

/* Perbaikan posisi Label */
.input-box .floating-label {
    position: absolute;
    left: 16px;
    top: 50%; /* Center secara vertikal */
    transform: translateY(-50%);
    pointer-events: none;
    display: flex;
    transition: 0.3s;
}

.input-box .floating-label span {
    color: var(--text-grey);
    font-size: 1rem;
    transition: 0.25s cubic-bezier(0.5, 1, 0.5, 1);
    transition-delay: calc(var(--index) * 0.05s);
}

/* Efek saat Fokus atau Input Terisi */
.input-control:focus ~ .floating-label,
.input-control:not(:placeholder-shown) ~ .floating-label {
    top: -10px; /* Naik ke atas border */
    left: 12px;
}

.input-control:focus ~ .floating-label span,
.input-control:not(:placeholder-shown) ~ .floating-label span {
    transform: translateY(0);
    font-size: 0.8rem;
    color: var(--primary-color);
    background: var(--card-bg); 
}

/* --- Tambahan untuk Versi Selection --- */
.version-selection {
    margin-bottom: 24px;
}

.section-label {
    font-size: 0.85rem;
    color: var(--text-grey);
    margin-bottom: 12px;
    display: block;
    text-align: center;
}

.version-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.version-grid input[type="radio"] {
    display: none; /* Sembunyikan radio button asli */
}

.version-card {
    background: var(--input-bg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 12px;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.version-card i {
    font-size: 1.2rem;
    color: var(--text-grey);
}

.version-card span {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-grey);
}

/* State Aktif */
.version-grid input[type="radio"]:checked + .version-card {
    border-color: var(--primary-color);
    background: rgba(109, 93, 252, 0.1);
}

.version-grid input[type="radio"]:checked + .version-card i,
.version-grid input[type="radio"]:checked + .version-card span {
    color: var(--primary-color);
}

.version-card:hover {
    border-color: rgba(255, 255, 255, 0.3);
}

.password-group {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.password-wrapper {
    position: relative;
    width: 100%;
}

.toggle-password {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    cursor: pointer;
    color: var(--text-grey);
}

.toggle-password.fa-eye-slash {
    color: var(--primary-color);
}

/* Indikator Error Clean */
.error-message {
    color: #ff4d4d;
    font-size: 0.75rem;
    margin-top: 5px;
    display: none; /* Sembunyikan secara default */
    font-weight: 500;
    transition: all 0.3s ease;
}

/* State ketika input tidak cocok */
.input-control.invalid {
    border-color: #ff4d4d !important;
    background: rgba(255, 77, 77, 0.05);
}

/* Opsional: Menonaktifkan tombol jika tidak valid */
.btn-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    filter: grayscale(1);
}


/* Checkbox */
.terms-check {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 24px 0;
    font-size: 0.85rem;
    color: var(--text-grey);
}

.terms-check a {
    color: var(--text-white);
    text-decoration: underline;
}

/* Button */
.btn-submit {
    width: 100%;
    padding: 16px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: 0.3s ease;
}

.btn-submit:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}

/* Captcha */
.captcha-container {
    margin-top: 30px;
    text-align: center;
}

.captcha-label {
    font-size: 0.7rem;
    color: var(--text-grey);
    letter-spacing: 1.5px;
    text-transform: uppercase;
    display: block;
    margin-bottom: 15px;
}

.captcha-box {
    background: rgba(0, 0, 0, 0.3);
    border: 1px dashed rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    padding: 20px;
    color: var(--text-grey);
    font-size: 0.8rem;
}

/* RESPONSIVE: MOBILE MODE */
@media (max-width: 850px) {
    body {
        /* Gambar jadi latar belakang seluruh halaman di mobile */
        background: linear-gradient(rgba(19, 19, 26, 0.85), rgba(19, 19, 26, 0.85)), 
                    url('/assets/images/baground.webp') center/cover no-repeat;
        padding: 15px;
    }

    .auth-container {
        flex-direction: column;
        background-color: rgba(26, 26, 36, 0.95); /* Sedikit transparan agar estetik */
        backdrop-filter: blur(10px);
        max-width: 450px;
    }

    .auth-hero {
        min-height: auto;
        padding: 30px;
        background: none; /* Hilangkan background hero karena sudah jadi bg body */
    }

    .auth-hero::before {
        display: none; /* Hilangkan overlay hero */
    }
    
    .auth-logo {
        display: block;
        margin-bottom: 20px;
        text-align: center;
    }
    
    .logo-img {
        height: 35px;
    }

    .hero-text h2 {
        font-size: 1.5rem;
        text-align: center;
    }

    .carousel-indicators {
        justify-content: center;
    }

    .auth-logo, .back-link {
        display: none; /* Opsional: sembunyikan elemen minor di mobile agar ringkas */
    }

    .auth-form-section {
        padding: 30px 25px;
    }
}
