/* ==================== GLOBAL & BODY STYLES ==================== */
body { 
    /* Menggabungkan semua properti background untuk kerapian */
    background: linear-gradient(rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0.75)), 
                url('../img/background.jpg') no-repeat center center fixed;
    background-size: cover;
    font-family: Arial, sans-serif;
    padding: 0; /* Dipastikan 0 untuk menghindari scroll bar yang tidak perlu */
    margin: 0; 
    height: 100vh; /* Memastikan body mengisi 100% viewport height */
    overflow: hidden; /* Mencegah scroll pada body */
}

/* ==================== CONTAINER STYLES (Dikecilkan) ==================== */
.container { 
    max-width: 300px; /* Diperkecil dari 400px */
    margin: 50px auto 0 auto; /* Tengah horizontal, 50px dari atas */
    background: rgba(255, 255, 255, 0.767);
    box-shadow: 0 8px 30px rgba(255, 255, 255, 0.4); /* Shadow lebih dalam */
    margin-top: 80px;
    padding: 25px; /* Dikurangi dari 50px agar box lebih kecil */
    border-radius: 15px; /* Sedikit dikurangi */
    font-size: 13px;
}

.container h2 { 
    text-align: center;
    margin-top: -5px !important;
    margin-bottom: 20px;
    font-weight: 700;
    font-size: 25px !important;
}

/* ==================== FORM ELEMENTS ==================== */
input, 
select { 
    width: 100%;
    padding: 10px;
    margin: 8px 0 15px 0;
    display: inline-block;
    border: 1px solid #ccc;
    border-radius: 8px;
    box-sizing: border-box; /* Sangat penting agar padding tidak menambah total lebar */
}

/* ==================== PRIMARY BUTTON ==================== */
button { 
    background-color: #277a2aff; /* Hijau Utama */
    color: white;
    padding: 10px 15px;
    margin: 8px 0;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    width: 100%;
    transition: background-color 0.3s;
}

button:hover { 
    background-color: #00f70cff; /* Efek hover hijau cerah */
}

/* ==================== CANCEL BUTTON ==================== */
.cancel-button {
    display: block;
    text-align: center;
    background-color: #b4382fff; /* Merah Marun */
    color: white;
    padding: 8px 0px;
    margin: 8px 0 0 0;
    border-radius: 25px;
    text-decoration: none;
    cursor: pointer;
    width: 100%;
    box-sizing: border-box;
    transition: background-color 0.3s;
}

.cancel-button:hover {
    background-color: #ff0000ff; /* Efek hover merah cerah */
}
/* ==================== MODAL/POPUP STYLES ==================== */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(5px);
    z-index: 9999;
    animation: modalFadeIn 0.3s ease;
}

.modal-overlay.show {
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-container {
    background: #2a2a2a;
    border-radius: 16px;
    padding: 15px;
    max-width: 450px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: modalSlideUp 0.3s ease;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-header {
    background: #2a2a2a;
    padding: 20px 25px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    gap: 12px;
}

.modal-header h3 {
    color: #ffffff;
    font-size: clamp(16px, 1.5vw, 20px);
    font-weight: 600;
    margin: 0;
}

.modal-body {
    padding: 30px 25px;
    color: #ffffff;
    background: #2a2a2a;
}

.modal-message {
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

/* ==================== SMOOTH ICON STYLES ==================== */
.modal-icon {
    font-size: 32px;
    flex-shrink: 0;
    filter: drop-shadow(0 2px 8px currentColor);
}

/* Success Icon - Smooth Bounce + Gentle Pulse */
.modal-icon.success {
    color: #4caf50;
    animation: iconSmoothBounce 0.7s cubic-bezier(0.34, 1.56, 0.64, 1), 
               iconGentlePulse 2.5s ease-in-out 0.7s infinite;
}

/* Error Icon - Elastic Shake */
.modal-icon.error {
    color: #f44336;
    animation: iconElasticShake 0.8s cubic-bezier(0.36, 0.07, 0.19, 0.97);
}

/* Warning Icon - Smooth Swing */
.modal-icon.warning {
    color: #ff9800;
    animation: iconSmoothBounce 0.7s cubic-bezier(0.34, 1.56, 0.64, 1), 
               iconSmoothSwing 2s ease-in-out 0.7s infinite;
    transform-origin: top center;
}

/* Info Icon - Smooth Pop */
.modal-icon.info {
    color: #2196f3;
    animation: iconSmoothPop 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* ==================== SMOOTH ANIMATIONS ==================== */

/* Smooth Bounce - Elastic & Natural */
@keyframes iconSmoothBounce {
    0% {
        transform: scale(0) translateY(30px) rotate(-10deg);
        opacity: 0;
    }
    40% {
        transform: scale(1.15) translateY(-8px) rotate(3deg);
    }
    60% {
        transform: scale(0.92) translateY(4px) rotate(-2deg);
    }
    80% {
        transform: scale(1.05) translateY(-2px) rotate(1deg);
    }
    100% {
        transform: scale(1) translateY(0) rotate(0deg);
        opacity: 1;
    }
}

/* Gentle Pulse - Smooth & Subtle */
@keyframes iconGentlePulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
        filter: drop-shadow(0 2px 8px currentColor);
    }
    50% {
        transform: scale(1.08);
        opacity: 0.9;
        filter: drop-shadow(0 4px 12px currentColor);
    }
}

/* Elastic Shake - Smooth dengan Rotation */
@keyframes iconElasticShake {
    0%, 100% {
        transform: translateX(0) rotate(0deg) scale(1);
    }
    10% {
        transform: translateX(-8px) rotate(-6deg) scale(1.05);
    }
    20% {
        transform: translateX(8px) rotate(6deg) scale(1.08);
    }
    30% {
        transform: translateX(-6px) rotate(-4deg) scale(1.06);
    }
    40% {
        transform: translateX(6px) rotate(4deg) scale(1.04);
    }
    50% {
        transform: translateX(-4px) rotate(-2deg) scale(1.02);
    }
    60% {
        transform: translateX(4px) rotate(2deg) scale(1.01);
    }
    70% {
        transform: translateX(-2px) rotate(-1deg) scale(1);
    }
    80% {
        transform: translateX(2px) rotate(1deg) scale(1);
    }
    90% {
        transform: translateX(-1px) rotate(0deg) scale(1);
    }
}

/* Smooth Swing - Natural Pendulum */
@keyframes iconSmoothSwing {
    0%, 100% {
        transform: rotate(0deg);
    }
    10% {
        transform: rotate(10deg);
    }
    20% {
        transform: rotate(-8deg);
    }
    30% {
        transform: rotate(6deg);
    }
    40% {
        transform: rotate(-4deg);
    }
    50% {
        transform: rotate(2deg);
    }
    60% {
        transform: rotate(-1deg);
    }
    70% {
        transform: rotate(0.5deg);
    }
    80% {
        transform: rotate(0deg);
    }
}

/* Smooth Pop - Playful Bounce */
@keyframes iconSmoothPop {
    0% {
        transform: scale(0) rotate(180deg);
        opacity: 0;
    }
    50% {
        transform: scale(1.2) rotate(-10deg);
    }
    70% {
        transform: scale(0.9) rotate(5deg);
    }
    85% {
        transform: scale(1.05) rotate(-2deg);
    }
    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

.modal-text {
    flex: 1;
    line-height: 1.6;
    font-size: clamp(14px, 1.2vw, 16px);
}

.modal-footer {
    padding: 20px 200px;
    margin-top: -20px;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    background: #2a2a2a;
}

.modal-btn {
    padding: 10px 10px;
    border: none;
    border-radius: 15px;
    font-size: clamp(14px, 1.1vw, 16px);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
    color: #ffffff !important;
}

.modal-btn-primary {
    background: #278a00 !important;
    color: #ffffff !important;
    box-shadow: 0 4px 15px rgba(153, 255, 0, 0.3);
}

.modal-btn-primary:hover {
    background: #99ff00 !important;
    box-shadow: 0 6px 20px rgba(153, 255, 0, 0.4);
    color: #ffffff !important;
}

.modal-btn-secondary {
    background: #860000c7;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.modal-btn-secondary:hover {
    background: #d30000;
    border-color: rgba(255, 255, 255, 0.25);
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes modalSlideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}.username-wrapper {
            position: relative;
        }
        
        .username-input-wrapper {
            position: relative;
        }
        
        .username-input-wrapper input {
            padding-right: 45px;
        }
        
        /* Icon di dalam input */
        .username-status-icon {
            position: absolute;
            right: 15px;
            top: 50%;
            transform: translateY(-70%);
            font-size: 16px;
            opacity: 0;
            transition: all 0.3s ease;
        }
        
        .username-status-icon.show {
            opacity: 1;
            animation: iconPop 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
        }
        
        @keyframes iconPop {
            0% { transform: translateY(-70%) scale(0); }
            100% { transform: translateY(-70%) scale(1); }
        }
        
        .username-status-icon.available {
            color: #4caf50;
        }
        
        .username-status-icon.taken {
            color: #f44336;
        }
        
        .username-status-icon.checking {
            color: #ff9800;
            animation: iconSpin 1s linear infinite;
        }
        
        @keyframes iconSpin {
            from { transform: translateY(-70%) rotate(0deg); }
            to { transform: translateY(-70%) rotate(360deg); }
        }
        
        /* Pesan kecil di bawah kolom - DIPERBAIKI */
        .username-feedback {
            display: none;
            margin-top: 5px;
            margin-bottom: 15px;
            font-size: 11px;
            font-weight: 500;
            opacity: 0;
            transform: translateY(-15px) !important;
            transition: all 0.3s ease;
        }
        
        .username-feedback.show {
            display: block;
            opacity: 1;
            transform: translateY(0);
        }
        
        .username-feedback.available {
            color: #4caf50;
        }
        
        .username-feedback.taken {
            color: #f44336;
        }
        
        .username-feedback.checking {
            color: rgba(255, 255, 255, 0.6);
        }
        
        button[type="submit"]:disabled {
            opacity: 0.5;
            cursor: not-allowed;
        }