/* ===== VARIABEL CSS ===== */
:root {
    --primary-color: #d65a31;
    --primary-dark: #a34626;
    --primary-light: rgba(214, 90, 49, 0.1);
    --gradient-primary: linear-gradient(135deg, #d65a31 0%, #a34626 100%);
    --gradient-bg: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-bg-alt: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --text-dark: #333;
    --text-light: #666;
    --white: #fff;
    --error-bg: #f8d7da;
    --error-text: #721c24;
    --error-border: #f5c6cb;
    --shadow-light: 0 5px 15px rgba(0, 0, 0, 0.1);
    --shadow-medium: 0 10px 30px rgba(0, 0, 0, 0.2);
    --shadow-heavy: 0 15px 40px rgba(0, 0, 0, 0.3);
    --border-radius: 15px;
    --transition: all 0.3s ease;
}

/* ===== RESET & BASE STYLES ===== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--gradient-bg);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    padding: 20px;
    position: relative;
    overflow-x: hidden;
}

/* ===== BACKGROUND ANIMATION ===== */
.bg-animation {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.bg-bubble {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    animation: float 15s infinite linear;
}

.bg-bubble:nth-child(1) {
    width: 80px;
    height: 80px;
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.bg-bubble:nth-child(2) {
    width: 100px;
    height: 100px;
    top: 60%;
    left: 80%;
    animation-delay: 2s;
}

.bg-bubble:nth-child(3) {
    width: 60px;
    height: 60px;
    top: 80%;
    left: 20%;
    animation-delay: 4s;
}

.bg-bubble:nth-child(4) {
    width: 120px;
    height: 120px;
    top: 30%;
    left: 70%;
    animation-delay: 6s;
}

@keyframes float {
    0% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(180deg);
    }
    100% {
        transform: translateY(0) rotate(360deg);
    }
}

/* ===== LOGIN CONTAINER ===== */
.login-container {
    background-color: var(--white);
    padding: 50px 40px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-heavy);
    width: 100%;
    max-width: 400px;
    text-align: center;
    position: relative;
    animation: fadeInUp 0.8s ease-out;
    z-index: 10;
    transition: var(--transition);
}

.login-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== LOGO STYLES ===== */
.logo-container {
    margin-bottom: 25px;
    position: relative;
}

.logo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    box-shadow: var(--shadow-light);
    transition: var(--transition);
    object-fit: cover;
    border: 3px solid var(--primary-color);
}

.logo:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(214, 90, 49, 0.3);
}

.logo-fallback {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto;
    box-shadow: var(--shadow-light);
    color: var(--white);
    font-size: 2.5rem;
    font-weight: bold;
    transition: var(--transition);
}

.logo-fallback:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(214, 90, 49, 0.3);
}

/* ===== HEADING STYLES ===== */
.login-container h2 {
    color: var(--primary-color);
    margin-bottom: 30px;
    font-size: 24px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
    position: relative;
    padding-bottom: 15px;
}

.login-container h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 3px;
    background: var(--gradient-primary);
    border-radius: 3px;
}

/* ===== FORM STYLES ===== */
.login-form {
    margin-top: 20px;
}

.form-group {
    margin-bottom: 20px;
    position: relative;
}

.form-group input {
    width: 100%;
    padding: 15px 15px 15px 45px;
    border: 2px solid #e1e1e1;
    border-radius: 10px;
    font-size: 16px;
    transition: var(--transition);
    background-color: #f9f9f9;
}

.form-group input:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(214, 90, 49, 0.2);
    background-color: var(--white);
}

.form-group i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary-color);
    font-size: 18px;
}

/* ===== BUTTON STYLES ===== */
.login-btn {
    background: var(--gradient-primary);
    color: var(--white);
    padding: 15px 20px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    width: 100%;
    font-size: 18px;
    font-weight: bold;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.login-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 7px 20px rgba(214, 90, 49, 0.4);
}

.login-btn:active {
    transform: translateY(-1px);
}

.login-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 0;
    border-radius: 100%;
    transform: scale(1, 1) translate(-50%);
    transform-origin: 50% 50%;
}

.login-btn:focus:not(:active)::after {
    animation: ripple 1s ease-out;
}

@keyframes ripple {
    0% {
        transform: scale(0, 0);
        opacity: 0.5;
    }
    100% {
        transform: scale(20, 20);
        opacity: 0;
    }
}

/* ===== MESSAGE BOXES ===== */
.message-box {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 10px;
    font-weight: bold;
    text-align: left;
    animation: slideIn 0.5s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.message-box.error {
    background-color: var(--error-bg);
    color: var(--error-text);
    border: 1px solid var(--error-border);
    border-left: 4px solid var(--error-text);
}

/* ===== FOOTER STYLES ===== */
.footer {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    color: var(--text-light);
    font-size: 12px;
    text-align: center;
}

.footer p {
    margin: 5px 0;
}

.version {
    font-weight: bold;
    color: var(--primary-color);
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 480px) {
    .login-container {
        padding: 30px 20px;
    }
    
    .logo, .logo-fallback {
        width: 100px;
        height: 100px;
    }
    
    .login-container h2 {
        font-size: 20px;
    }
    
    .form-group input {
        padding: 12px 12px 12px 40px;
    }
    
    .login-btn {
        padding: 12px 15px;
        font-size: 16px;
    }
}

/* ===== DARK MODE SUPPORT ===== */
@media (prefers-color-scheme: dark) {
    :root {
        --white: #1e1e1e;
        --text-dark: #f0f0f0;
        --text-light: #b0b0b0;
    }
    
    .login-container {
        background-color: var(--white);
        color: var(--text-dark);
    }
    
    .form-group input {
        background-color: #2a2a2a;
        border-color: #444;
        color: var(--text-dark);
    }
    
    .form-group input:focus {
        background-color: #333;
    }
    
    .footer {
        border-top-color: #444;
    }
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .login-container:hover {
        transform: none;
    }
    
    .logo:hover, .logo-fallback:hover {
        transform: none;
    }
    
    .login-btn:hover {
        transform: none;
    }
}