/* Variabel Warna untuk tema Dark Airport */
:root {
    --primary-color: #3498db; /* Biru langit */
    --secondary-color: #1a2a3a; /* Biru gelap */
    --accent-color: #f39c12; /* Oranye runway */
    --gradient-start: #1a2a3a;
    --gradient-end: #0f1721;
    --background-color: #0f1721;
    --card-background: rgba(26, 42, 58, 0.3);
    --text-color: #e0e0e0;
    --subtle-text-color: #a0a0a0;
    --shadow-color: rgba(0, 0, 0, 0.3);
    --error-color: #e74c3c;
    --success-color: #2ecc71;
    --primary-color-dark: #2177b8;
}

/* Reset dan Pengaturan Dasar Body */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Poppins', sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Login Page Styles */
.login-body {
    background: linear-gradient(135deg, #0f1721 0%, #1a2a3a 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 2rem;
    position: relative;
    background-image: url('https://images.unsplash.com/photo-1436491865332-7a61a109cc05?ixlib=rb-1.2.1&auto=format&fit=crop&w=1950&q=80');
    background-size: cover;
    background-position: center;
    background-blend-mode: overlay;
}

/* Background Shapes Animation */
.background-shapes {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
}

.shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.6;
    animation: float 15s infinite ease-in-out;
}

.shape-1 {
    background: linear-gradient(45deg, rgba(52, 152, 219, 0.5), rgba(26, 42, 58, 0.7));
    width: 300px;
    height: 300px;
    top: -100px;
    left: -100px;
    animation-delay: 0s;
    clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%); /* Lampu runway Bandara Minangkabau */
}

.shape-2 {
    background: linear-gradient(45deg, rgba(243, 156, 18, 0.5), rgba(26, 42, 58, 0.7));
    width: 400px;
    height: 400px;
    bottom: -150px;
    right: -100px;
    animation-delay: -5s;
    clip-path: polygon(50% 0%, 100% 38%, 82% 100%, 18% 100%, 0% 38%); /* Siluet pesawat Bandara Internasional Minangkabau */
}

.shape-3 {
    background: linear-gradient(45deg, rgba(52, 152, 219, 0.5), rgba(243, 156, 18, 0.5));
    width: 200px;
    height: 200px;
    top: 50%;
    left: 10%;
    animation-delay: -2s;
    clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%); /* Menara kontrol Bandara Internasional Minangkabau */
}

.shape-4 {
    background: linear-gradient(45deg, rgba(243, 156, 18, 0.5), rgba(52, 152, 219, 0.5));
    width: 150px;
    height: 150px;
    top: 20%;
    right: 20%;
    animation-delay: -7s;
    clip-path: polygon(0% 0%, 100% 0%, 100% 75%, 75% 75%, 75% 100%, 50% 75%, 25% 100%, 25% 75%, 0% 75%); /* Landasan pacu Bandara Internasional Minangkabau */
}

.shape-5 {
    background: linear-gradient(45deg, rgba(52, 152, 219, 0.4), rgba(243, 156, 18, 0.6));
    width: 250px;
    height: 150px;
    bottom: 15%;
    left: 15%;
    animation-delay: -3s;
    clip-path: polygon(0% 80%, 20% 0%, 40% 60%, 60% 0%, 80% 60%, 100% 0%, 100% 80%); /* Rumah Gadang khas Minangkabau */
}

@keyframes float {
    0% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(5deg);
    }
    100% {
        transform: translateY(0) rotate(0deg);
    }
}

/* Login Container */
.login-container {
    width: 100%;
    max-width: 450px;
    z-index: 10;
    perspective: 1000px;
}

/* Login Card with Glassmorphism */
.login-card {
    background: rgba(26, 42, 58, 0.3);
    border: 1px solid rgba(52, 152, 219, 0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: 0 8px 32px var(--shadow-color), 0 0 10px rgba(52, 152, 219, 0.3);
    padding: 2.5rem;
    width: 100%;
    text-align: center;
    transform-style: preserve-3d;
    transform: rotateX(0deg);
    transition: transform 0.6s ease, box-shadow 0.6s ease;
    animation: cardAppear 0.8s ease-out forwards;
}

@keyframes cardAppear {
    0% {
        opacity: 0;
        transform: translateY(30px) rotateX(10deg);
    }
    100% {
        opacity: 1;
        transform: translateY(0) rotateX(0deg);
    }
}

.login-card:hover {
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

/* Logo Container */
.logo-container {
    margin-bottom: 2rem;
    display: flex;
    justify-content: center;
}

/* Logo styling */

.logo-image {
    height: 90px;
    width: auto;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
    margin: 0 auto;
}

/* Login Title and Subtitle */
.login-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    background: linear-gradient(to right, rgba(52, 152, 219, 1), rgba(243, 156, 18, 0.8));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: fadeIn 0.8s ease-out forwards;
    animation-delay: 0.2s;
    opacity: 0;
    text-shadow: 0 2px 10px rgba(52, 152, 219, 0.3);
}

.login-subtitle {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 0.5rem;
    animation: fadeIn 0.8s ease-out forwards;
    animation-delay: 0.4s;
    opacity: 0;
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.2);
}

.login-subtitle:last-of-type {
    margin-bottom: 2rem;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Form Styling */
#loginForm {
    text-align: left;
}

/* Input Group Styling */
.input-group {
    position: relative;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    animation: fadeIn 0.8s ease-out forwards;
    animation-delay: 0.6s;
    opacity: 0;
}

.input-icon {
    position: absolute;
    left: 15px;
    color: var(--primary-color);
    font-size: 1.2rem;
    z-index: 10;
    transition: all 0.3s ease;
}

.input-field {
    position: relative;
    width: 100%;
}

.input-field input {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    border: 1px solid rgba(52, 152, 219, 0.3);
    border-radius: 10px;
    font-size: 1rem;
    color: var(--text-color);
    background-color: rgba(15, 23, 33, 0.4);
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.input-field input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 4px rgba(52, 152, 219, 0.25);
    background-color: rgba(26, 42, 58, 0.5);
}

.input-field input:focus + label,
.input-field input:not(:placeholder-shown) + label {
    transform: translateY(-120%) scale(0.8);
    color: var(--primary-color);
    font-weight: 500;
}

.input-field label {
    position: absolute;
    left: 3rem;
    top: 1rem;
    color: var(--subtle-text-color);
    pointer-events: none;
    transition: all 0.3s ease;
    transform-origin: left top;
}

.input-field input::placeholder {
    color: transparent;
}

/* Toggle Password Visibility */
.toggle-password {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: var(--subtle-text-color);
    transition: all 0.3s ease;
}

.toggle-password:hover {
    color: var(--primary-color);
}

/* Button Styling */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 1rem 1.5rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 1.1rem;
    color: white;
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.7), rgba(26, 42, 58, 0.7));
    border: 1px solid rgba(243, 156, 18, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.4), 0 0 5px rgba(243, 156, 18, 0.3);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    margin-top: 1rem;
    position: relative;
    overflow: hidden;
    animation: fadeIn 0.8s ease-out forwards;
    animation-delay: 0.8s;
    opacity: 0;
}

.btn-primary:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(243, 156, 18, 0.3), transparent);
    transition: all 0.6s ease;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(52, 152, 219, 0.5), 0 0 10px rgba(243, 156, 18, 0.4);
    border-color: rgba(243, 156, 18, 0.8);
}

.btn-primary:hover:not(:disabled):before {
    left: 100%;
}

.btn-primary:active:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.5);
}

.btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Loading Spinner */
.loading-spinner {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(52, 152, 219, 0.3);
    border-top: 3px solid rgba(243, 156, 18, 0.9);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 0.75rem;
    box-shadow: 0 0 10px rgba(52, 152, 219, 0.2);
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Error Message */
.error-message {
    margin-top: 1rem;
    padding: 0.75rem;
    border-radius: 8px;
    background-color: rgba(231, 76, 60, 0.15);
    border: 1px solid rgba(231, 76, 60, 0.3);
    color: rgba(255, 255, 255, 0.95);
    font-size: 0.9rem;
    text-align: center;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    animation: shake 0.5s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
    transform: translate3d(0, 0, 0);
    box-shadow: 0 0 10px rgba(231, 76, 60, 0.1);
}

@keyframes shake {
    10%, 90% {
        transform: translate3d(-1px, 0, 0);
    }
    20%, 80% {
        transform: translate3d(2px, 0, 0);
    }
    30%, 50%, 70% {
        transform: translate3d(-4px, 0, 0);
    }
    40%, 60% {
        transform: translate3d(4px, 0, 0);
    }
}

.hidden {
    display: none;
}

/* Tombol Kembali */
.back-to-home {
    position: absolute;
    top: 2rem;
    left: 2rem;
}

.back-link {
    color: #fff; /* Mengubah warna teks menjadi putih */
    font-size: 0.9rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    background: linear-gradient(45deg, var(--primary-color), var(--primary-color-dark)); /* Menggunakan gradient yang sama */
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.2); /* Menambahkan shadow yang serasi */
}

.back-link:hover {
    color: #fff;
    background: linear-gradient(45deg, var(--primary-color-dark), var(--primary-color)); /* Efek hover yang serasi */
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.3); /* Shadow yang lebih kuat saat hover */
}

.back-link i {
    transition: transform 0.3s ease;
}

.back-link:hover i {
    transform: translateX(-3px);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .login-body {
        padding: 1.5rem;
    }
    
    .login-card {
        padding: 2rem;
    }
    
    .logo-image {
        height: 70px;
    }
    
    .login-title {
        font-size: 1.75rem;
    }
    
    .shape {
        filter: blur(40px);
    }
}

@media (max-width: 480px) {
    .login-card {
        padding: 1.5rem;
    }
    
    .logo-image {
        height: 60px;
    }
    
    .login-title {
        font-size: 1.5rem;
    }
    
    .input-field input {
        padding: 0.9rem 1rem 0.9rem 3rem;
    }
    
    .btn-primary {
        padding: 0.9rem 1.25rem;
    }
    
    .shape {
        filter: blur(30px);
    }
}