/* Modern Login Page Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -4;
}

body::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(25, 25, 112, 0.05) 0%, rgba(65, 105, 225, 0.1) 100%);
    z-index: -2;
}

/* Video Background */
.video-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -3;
    pointer-events: none;
    mix-blend-mode: multiply;
    opacity: 0.8;
}

/* Fallback for browsers that don't support video */
@supports not (object-fit: cover) {
    .video-background {
        display: none;
    }
}

/* Main Grid Container */
.main-grid-container {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 0;
    align-items: start;
    justify-items: stretch;
    max-width: 2400px;
    width: 100%;
    padding: 20px;
    z-index: 1;
}



.login-container {
    width: 100%;
    max-width: 480px;
    padding: 20px;
    z-index: 1;
    justify-self: end;
}

/* Walikota Image Container */
.walikota-image-container {
    justify-self: start;
    z-index: 1;
    max-width: 1600px;
    padding: 20px;
    text-align: center;
}

.walikota-image {
    width: 100%;
    height: auto;
    max-height: 2000px;
    object-fit: cover;
    border-radius: 0;
    box-shadow: none;
    border: none;
    backdrop-filter: none;
    background: transparent;
    margin: 0 auto;
}

/* Walikota Banner */
.walikota-banner {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 20px;
    margin-top: 20px;
    text-align: center;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
}

.walikota-name {
    font-size: 18px;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.walikota-title {
    font-size: 14px;
    color: #4a5568;
    margin-bottom: 15px;
    font-weight: 500;
}

.walikota-banner .walikota-name:last-of-type {
    margin-top: 15px;
}

.walikota-item {
    flex: 1;
    text-align: center;
}

.walikota-item.left {
    text-align: left;
}

.walikota-item.right {
    text-align: right;
}

.login-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 40px 35px;
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(255, 255, 255, 0.2) inset;
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.login-card:hover {
    transform: translateY(-5px);
    box-shadow: 
        0 30px 60px rgba(0, 0, 0, 0.15),
        0 0 0 1px rgba(255, 255, 255, 0.3) inset;
}

.login-header {
    text-align: center;
    margin-bottom: 35px;
}

.logo-container {
    margin-bottom: 20px;
}

.logo-container img {
    height: 70px;
    width: auto;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
    transition: transform 0.3s ease;
}

.logo-container img:hover {
    transform: scale(1.05);
}

.login-title {
    font-size: 24px;
    font-weight: 700;
    color: #2a6fdb;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    line-height: 1.3;
}

.login-subtitle {
    font-size: 14px;
    color: #4a5568;
    font-weight: 400;
}

.alert {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 12px 16px;
    margin-bottom: 20px;
    font-size: 14px;
    box-shadow: 0 4px 15px rgba(238, 90, 82, 0.3);
    animation: slideInDown 0.5s ease-out;
}

.alert-success {
    background: linear-gradient(135deg, #51cf66 0%, #40c057 100%);
    box-shadow: 0 4px 15px rgba(64, 192, 87, 0.3);
}

@keyframes slideInDown {
    from { transform: translateY(-20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.login-form {
    margin-top: 10px;
}

.input-group {
    position: relative;
    margin-bottom: 25px;
}

.form-input {
    width: 100%;
    padding: 16px 50px 16px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    font-size: 16px;
    font-family: 'Poppins', sans-serif;
    background: #f7fafc;
    transition: all 0.3s ease;
    outline: none;
}

.form-input:focus {
    border-color: #667eea;
    background: white;
    box-shadow: 
        0 0 0 4px rgba(102, 126, 234, 0.1),
        0 4px 15px rgba(102, 126, 234, 0.2);
    transform: translateY(-2px);
}

.form-input::placeholder {
    color: #6b7280;
    font-weight: 400;
}

.input-icon {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: #a0aec0;
    font-size: 16px;
    transition: color 0.3s ease;
}

.form-input:focus ~ .input-icon {
    color: #667eea;
}

.toggle-password {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #a0aec0;
    cursor: pointer;
    font-size: 16px;
    padding: 5px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.toggle-password:hover {
    color: #667eea;
    background: rgba(102, 126, 234, 0.1);
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    font-size: 14px;
}

.remember-me {
    display: flex;
    align-items: center;
    cursor: pointer;
    color: #4a5568;
    font-weight: 500;
}

.remember-me input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin-right: 8px;
    accent-color: #667eea;
    cursor: pointer;
}

.login-button {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #2a6fdb 0%, #1e4b9a 100%);
    color: white;
    border: none;
    border-radius: 16px;
    font-size: 16px;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    position: relative;
    overflow: hidden;
}

.login-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.login-button:hover::before {
    left: 100%;
}

.login-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(102, 126, 234, 0.4);
}

.login-button:active {
    transform: translateY(-1px);
}

.login-button.loading {
    color: transparent;
}

.login-button.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid white;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Home Button Container */
.home-button-container {
    margin-top: 20px;
    text-align: center;
}

.home-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    text-decoration: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    font-family: 'Poppins', sans-serif;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.home-button:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.home-button:active {
    transform: translateY(0);
}

.home-button i {
    font-size: 16px;
}

/* Login Footer */
.login-footer {
    margin-top: 30px;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 6px;
    padding-bottom: 4px;
}

.footer-text {
    color: #000000;
    font-size: 11px;
    font-weight: 400;
    margin: 0;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    letter-spacing: 0.5px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.divider {
    text-align: center;
    margin: 25px 0;
    position: relative;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, #e2e8f0, transparent);
}

.divider span {
    background: white;
    padding: 0 15px;
    color: #a0aec0;
    font-size: 12px;
    font-weight: 500;
    position: relative;
}

/* Responsive Design */
@media (max-width: 480px) {
    .login-container {
        padding: 15px;
    }
    
    .login-card {
        padding: 30px 25px;
        border-radius: 20px;
    }
    
    .login-title {
        font-size: 24px;
    }
    
    .form-input {
        padding: 14px 45px 14px 18px;
        font-size: 15px;
    }
    
    .login-button {
        padding: 14px;
        font-size: 15px;
    }
    
    .form-options {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
}

@media (max-width: 360px) {
    .login-card {
        padding: 25px 20px;
    }
    
    .login-title {
        font-size: 22px;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    body {
        background: linear-gradient(135deg, #1a202c 0%, #2d3748 100%);
    }
    
    .login-card {
        background: rgba(45, 55, 72, 0.95);
        color: #e2e8f0;
    }
    
    .login-title {
        background: linear-gradient(135deg, #81e6d9 0%, #4fd1c7 100%);
        -webkit-background-clip: text;
        background-clip: text;
        -webkit-text-fill-color: transparent;
        color: transparent;
    }
    
    .login-subtitle {
        color: #a0aec0;
    }
    
    .form-input {
        background: rgba(74, 85, 104, 0.8);
        border-color: #4a5568;
        color: #e2e8f0;
    }
    
    .form-input::placeholder {
        color: #a0aec0;
    }
    
    .form-input:focus {
        background: rgba(45, 55, 72, 0.9);
        border-color: #81e6d9;
    }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Responsive design for mobile devices */
@media (max-width: 768px) {
    body {
        padding-right: 10px;
        padding-left: 10px;
    }
    
    .main-grid-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .login-container {
        max-width: 100%;
        padding: 15px;
        justify-self: center;
    }
    
    .walikota-image-container {
        display: none;
    }
    
    .login-footer {
        margin-top: 25px;
        padding-top: 4px;
        padding-bottom: 2px;
    }
    
    .footer-text {
        font-size: 10.5px;
    }
    
    .home-button {
        padding: 11px 22px;
        font-size: 13.5px;
    }
    
    .login-card {
        padding: 30px 25px;
    }
    
    .login-footer {
        margin-top: 15px;
        padding-top: 5px;
        padding-bottom: 3px;
    }
    
    .footer-text {
        font-size: 10px;
    }

    .footer-copyright {
        display: block;
    }
    
    .home-button {
        padding: 10px 20px;
        font-size: 13px;
    }
    
    .home-button i {
        font-size: 14px;
    }
}

/* Tablet responsive */
@media (max-width: 1024px) and (min-width: 769px) {
    body {
        padding-right: 30px;
        padding-left: 30px;
    }
    
    .main-grid-container {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .login-container {
        max-width: 440px;
        justify-self: center;
    }
    
    .walikota-image-container {
        display: none;
    }
}

/* Large screens */
@media (min-width: 1400px) {
    body {
        grid-template-columns: 3fr 1fr 1fr;
    }
    
    .login-container {
        grid-column: 1;
        max-width: 450px;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .login-card {
        border: 2px solid #2d3748;
    }
    
    .form-input {
        border-width: 3px;
    }
    
    .login-button {
        border: 2px solid white;
    }
}