/* Konstanta Warna - Dark Blue Theme */
:root {
    --color-background: #0a1628;
    --color-surface: #132238;
    --color-text-light: #ffffff;
    --color-text-secondary: #8b9fc4;
    --color-accent: #2699fb;
    --color-accent-dark: #1a7fd8;
    --color-error: #ff4d4f;
    --gradient-bg: linear-gradient(135deg, #0a1628 0%, #1a2f4a 100%);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.no-scroll {
  overflow: hidden;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: #000000;
  background-image: url('back.png'); /* Langsung set background di sini */
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  color: var(--color-text-light); 
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  position: relative;
  overflow-x: hidden;
  
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Mengizinkan seleksi teks pada area form agar user bisa mengetik */
.login-box, .login-box input, .login-box a, .register-link, .register-link a {
    user-select: text; 
}

img {
  -webkit-user-drag: none;
}

/* === ERROR MODAL STYLES === */
.modal-overlay {
    display: none; 
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-content {
    background: linear-gradient(135deg, rgba(19, 34, 56, 0.95) 0%, rgba(26, 47, 74, 0.95) 100%);
    backdrop-filter: blur(20px);
    color: var(--color-text-light); 
    padding: 35px;
    border-radius: 16px;
    max-width: 90%;
    width: 380px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
    text-align: center;
    transform: scale(0.9);
    transition: transform 0.3s ease;
    border: 1px solid rgba(38, 153, 251, 0.2);
}

.modal-content.show {
    transform: scale(1);
}

.modal-content h3 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.5rem;
    color: var(--color-error); 
}

.modal-content .modal-close-btn {
    background-color: var(--color-accent); 
    color: var(--color-background); 
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
}

/* === BAGIAN UTAMA FORMULIR LOGIN === */
.login-container {
  display: flex; /* Mengubah dari none menjadi flex agar langsung muncul */
  justify-content: center;
  align-items: center; 
  flex-grow: 1; 
  padding: 40px 20px;
  position: relative;
  z-index: 1;
}

.login-box {
  max-width: 420px;
  width: 100%;
}

.login-box .logo-img {
  display: block;
  max-width: 120px;
  margin: 0 auto 35px;
  height: auto;
}

.form-group {
  margin-bottom: 20px;
  text-align: left;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  font-size: 0.9rem;
}

.form-group input {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.2); 
  border-radius: 8px; 
  background: rgba(255, 255, 255, 0.1); 
  color: var(--color-text-light); 
  font-size: 1rem;
  transition: all 0.3s ease; 
}

.form-group input:focus {
  border-color: var(--color-accent); 
  outline: none;
  box-shadow: 0 0 0 3px rgba(38, 153, 251, 0.2); 
}

.password-container {
    position: relative;
}

.toggle-password {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
}

.btn-login {
  width: 100%;
  padding: 16px;
  background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-dark) 100%); 
  color: #ffffff; 
  font-size: 1.1rem;
  font-weight: 700;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  margin-top: 25px;
  box-shadow: 0 4px 15px rgba(38, 153, 251, 0.3);
}

.btn-login:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(38, 153, 251, 0.5);
}

.btn-login:disabled {
    background: rgba(139, 159, 196, 0.3);
    cursor: not-allowed;
}

.register-link, .reset-password-link {
    margin-top: 25px;
    font-size: 0.95rem;
    text-align: center;
}

.reset-password-link {
    text-align: left;
}

.register-link a, .reset-password-link a {
    color: var(--color-accent); 
    font-weight: bold;
}

/* === FOOTER === */
footer {
  padding: 25px;
  text-align: center;
  font-size: 0.9rem;
  width: 100%;
}

@media (max-width: 480px) {
    .login-box {
        padding: 0; 
    }
}