/* Reset CSS */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Poppins", sans-serif;
    text-decoration: none;
    list-style: none;
}

/* Layout Body */
body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #181e2a 0%, #232946 100%);
}

/* === SISTEM NOTIFIKASI === */

/* Container notifikasi di pojok kanan atas */
.notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
}

/* Kartu notifikasi */
.notification {
    background: #ffffff;
    padding: 16px 18px;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 340px;
    max-width: 380px;
    pointer-events: all;
    transform: translateX(420px);
    opacity: 0;
    animation: slideIn 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
    position: relative;
    overflow: hidden;
    border-left: 4px solid transparent;
}

/* Animasi slide masuk dari kanan */
@keyframes slideIn {
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* State saat notifikasi ditutup */
.notification.hide {
    animation: slideOut 0.3s ease-in forwards;
}

/* Animasi slide keluar ke kanan */
@keyframes slideOut {
    to {
        transform: translateX(420px);
        opacity: 0;
    }
}

/* Icon notifikasi */
.notification-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 24px;
}

/* Icon untuk notifikasi sukses */
.notification.success {
    border-left-color: #10b981;
}

.notification.success .notification-icon {
    background: #d1fae5;
    color: #10b981;
    animation: scaleIn 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* Icon untuk notifikasi error */
.notification.error {
    border-left-color: #ef4444;
}

.notification.error .notification-icon {
    background: #fee2e2;
    color: #ef4444;
    animation: shake 0.5s;
}

/* Icon untuk notifikasi warning */
.notification.warning {
    border-left-color: #f59e0b;
}

.notification.warning .notification-icon {
    background: #fef3c7;
    color: #f59e0b;
    animation: scaleIn 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* Animasi scale untuk icon */
@keyframes scaleIn {
    0% {
        transform: scale(0);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

/* Animasi shake untuk error */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Konten teks notifikasi */
.notification-content {
    flex: 1;
}

.notification-title {
    font-size: 15px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 3px;
}

.notification-message {
    font-size: 13px;
    color: #6b7280;
    line-height: 1.5;
}

/* Tombol close notifikasi */
.notification-close {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: #f3f4f6;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    flex-shrink: 0;
    transition: all 0.2s;
    font-size: 20px;
}

.notification-close:hover {
    background: #e5e7eb;
    color: #374151;
}

.notification-close:active {
    transform: scale(0.95);
}

/* Progress bar notifikasi auto-close */
.notification-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 4px;
    border-radius: 0 0 16px 16px;
    animation: progress 3s linear forwards;
}

.notification.success .notification-progress {
    background: #10b981;
}

.notification.error .notification-progress {
    background: #ef4444;
}

.notification.warning .notification-progress {
    background: #f59e0b;
}

/* Animasi progress bar dari kanan ke kiri */
@keyframes progress {
    from {
        width: 100%;
    }
    to {
        width: 0%;
    }
}

/* === CONTAINER UTAMA === */

.container {
    position: relative;
    width: 850px;
    height: 550px;
    background: #fff;
    margin: 20px;
    border-radius: 30px;
    box-shadow: 0 0 30px rgba(0, 0, 0, .2);
    overflow: hidden;
}

.container h1 {
    font-size: 36px;
    margin: -10px 0;
}

.container p {
    font-size: 14.5px;
    margin: 15px 0;
}

form {
    width: 100%;
}

/* === FORM BOX === */

/* Animasi shake untuk form saat error */
.form-box.shake {
    animation: formShake 0.5s;
}

@keyframes formShake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-10px); }
    20%, 40%, 60%, 80% { transform: translateX(10px); }
}

/* Container form login */
.form-box {
    position: absolute;
    right: 0;
    width: 50%;
    height: 100%;
    background: #fff;
    display: flex;
    align-items: center;
    color: #333;
    text-align: center;
    padding: 40px;
    z-index: 1;
    transition: .6s ease-in-out 1.2s, visibility 0s 1s;
}

/* Posisi form saat container aktif (tutorial mode) */
.container.active .form-box {
    right: 50%;
}

/* === INPUT FIELDS === */

.input-box {
    position: relative;
    margin: 30px 0;
}

.input-box input {
    width: 100%;
    padding: 13px 50px 13px 20px;
    background: #eee;
    border-radius: 8px;
    border: none;
    outline: none;
    font-size: 16px;
    color: #333;
    font-weight: 500;
    transition: all 0.3s ease;
}

.input-box input::placeholder {
    color: #888;
    font-weight: 400;
}

/* State saat input focus */
.input-box input:focus {
    background: #e3e9ff;
    box-shadow: 0 0 0 3px rgba(116, 148, 236, 0.1);
}

/* State saat input error */
.input-box input.error {
    background: #ffe8e8;
    border: 2px solid #f5576c;
    animation: inputShake 0.3s;
}

@keyframes inputShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Icon di dalam input */
.input-box i {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
    transition: all 0.3s ease;
}

/* Warna icon saat input error */
.input-box input.error + i {
    color: #f5576c;
}

/* Icon toggle show/hide password */
.input-box .toggle-password {
    right: 50px;
    cursor: pointer;
    color: #888;
    z-index: 10;
}

.input-box .toggle-password:hover {
    color: #7494ec;
}

.input-box .toggle-password:active {
    transform: translateY(-50%) scale(0.9);
}

/* === BUTTON STYLES === */

.btn {
    width: 100%;
    height: 48px;
    background: #7494ec;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, .1);
    border: none;
    cursor: pointer;
    font-size: 16px;
    color: #fff;
    font-weight: 600;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn:hover {
    background: #5a7bc8;
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(116, 148, 236, 0.4);
}

.btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(116, 148, 236, 0.3);
}

/* Efek ripple saat button diklik */
.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:active::before {
    width: 300px;
    height: 300px;
}

/* State button saat loading */
.btn.loading {
    pointer-events: none;
    background: #9eb3f0;
    color: transparent;
}

/* Spinner loading di button */
.btn.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 3px solid #fff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spinner 0.6s linear infinite;
}

@keyframes spinner {
    to {
        transform: rotate(360deg);
    }
}

/* State button disabled */
.btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

/* === TOGGLE BOX (Animasi Slide) === */

.toggle-box {
    position: absolute;
    width: 100%;
    height: 100%;
}

/* Lingkaran biru yang beranimasi */
.toggle-box::before {
    content: '';
    position: absolute;
    left: -250%;
    width: 300%;
    height: 100%;
    background: #7494ec;
    border-radius: 150px;
    z-index: 2;
    transition: 1.8s ease-in-out;
}

/* Posisi lingkaran saat container aktif */
.container.active .toggle-box::before {
    left: 50%;
}

/* === TOGGLE PANEL === */

.toggle-panel {
    position: absolute;
    width: 50%;
    height: 100%;
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 2;
    transition: .6s ease-in-out;
}

/* Panel kiri (Welcome Back) */
.toggle-panel.toggle-left {
    left: 0;
    transition-delay: 1.2s;
}

.container.active .toggle-panel.toggle-left {
    left: -50%;
    transition-delay: .6s;
}

/* Panel kanan (Login Tutorial) */
.toggle-panel.toggle-right {
    right: -50%;
    transition-delay: .6s;
}

.container.active .toggle-panel.toggle-right {
    right: 0;
    transition-delay: 1.2s;
}

.toggle-panel p {
    margin-bottom: 20px;
}

/* Button di toggle panel */
.toggle-panel .btn {
    width: 160px;
    height: 46px;
    background: transparent;
    border: 2px solid #fff;
    box-shadow: none;
}

.toggle-panel .btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(255, 255, 255, 0.2);
}

/* === TUTORIAL SECTION === */

/* Container tutorial di sebelah kiri */
.form-box.tutorial {
    position: absolute;
    left: -50%;
    width: 50%;
    height: 100%;
    background: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: #333;
    text-align: center;
    padding: 40px 25px;
    z-index: 1;
    transition: .6s ease-in-out 1.2s;
    overflow: hidden;
}

/* Posisi tutorial saat aktif */
.container.active .form-box.tutorial {
    left: 0;
}

/* Posisi login saat tutorial aktif */
.container.active .form-box.login {
    right: -50%;
}

.form-box.tutorial h1 {
    font-size: 28px;
    margin-bottom: 20px;
    color: #333;
    font-weight: 600;
    display: none;
}

/* Area scrollable untuk konten tutorial */
.tutorial-content {
    width: 100%;
    max-height: 490px;
    overflow-y: auto;
    text-align: left;
    padding-right: 10px;
}

/* Custom scrollbar */
.tutorial-content::-webkit-scrollbar {
    width: 6px;
}

.tutorial-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.tutorial-content::-webkit-scrollbar-thumb {
    background: #7494ec;
    border-radius: 3px;
}

.tutorial-content::-webkit-scrollbar-thumb:hover {
    background: #5a7bc8;
}

/* Kartu tutorial untuk setiap section */
.tutorial-card {
    background: #f8f9ff;
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 14px;
    border-left: 4px solid #7494ec;
    box-shadow: 0 2px 8px rgba(116, 148, 236, 0.1);
    transition: all 0.2s ease;
}

.tutorial-card:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(116, 148, 236, 0.15);
}

.tutorial-card h3 {
    color: #7494ec;
    margin-bottom: 10px;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tutorial-card h3 i {
    font-size: 18px;
}

.tutorial-card p {
    color: #555;
    line-height: 1.6;
    margin: 6px 0;
    font-size: 13px;
}

/* Box untuk menampilkan kredensial login */
.credential-box {
    background: linear-gradient(135deg, #e8f2ff 0%, #f0f6ff 100%);
    padding: 12px 14px;
    border-radius: 8px;
    margin: 10px 0;
    border: 1px dashed #7494ec;
    text-align: center;
}

.credential-box p {
    margin: 4px 0;
    font-size: 13px;
    font-weight: 500;
}

.credential-box strong {
    color: #7494ec;
    font-weight: 600;
}

.tutorial-card small {
    font-size: 11px;
    color: #777;
    font-style: italic;
    display: block;
    margin-top: 8px;
}

/* === RESPONSIVE DESIGN === */

/* Tablet dan Mobile Landscape */
@media screen and (max-width: 650px) {
    .container {
        height: calc(100vh - 40px);
    }

    /* Notifikasi responsive */
    .notification-container {
        top: 10px;
        right: 10px;
        left: 10px;
    }

    .notification {
        min-width: auto;
        width: 100%;
        transform: translateY(-120px);
    }

    @keyframes slideIn {
        to {
            transform: translateY(0);
            opacity: 1;
        }
    }

    .notification.hide {
        animation: slideOutMobile 0.3s ease-in forwards;
    }

    @keyframes slideOutMobile {
        to {
            transform: translateY(-120px);
            opacity: 0;
        }
    }

    /* Layout vertikal untuk form */
    .form-box {
        bottom: 0;
        width: 100%;
        height: 70%;
    }

    .container.active .form-box {
        right: 0;
        bottom: 30%;
    }

    /* Animasi toggle box vertikal */
    .toggle-box::before {
        left: 0;
        top: -270%;
        width: 100%;
        height: 300%;
        border-radius: 20vw;
    }

    .container.active .toggle-box::before {
        left: 0;
        top: 70%;
    }

    .container.active .toggle-panel.toggle-left {
        left: 0;
        top: -30%;
    }

    .toggle-panel {
        width: 100%;
        height: 30%;
    }

    .toggle-panel.toggle-left {
        top: 0;
    }

    .toggle-panel.toggle-right {
        right: 0;
        bottom: -30%;
    }

    .container.active .toggle-panel.toggle-right {
        bottom: 0;
    }

    /* Tutorial responsive */
    .form-box.tutorial {
        left: 0;
        bottom: -70%;
        top: auto;
        width: 100%;
        height: 70%;
        padding: 20px 15px;
    }

    .container.active .form-box.tutorial {
        left: 0;
        bottom: 0;
    }

    .container.active .form-box.login {
        right: 0;
        bottom: 70%;
    }

    .form-box.tutorial h1 {
        font-size: 22px;
        margin-bottom: 15px;
    }

    .tutorial-content {
        max-height: 350px;
        padding-right: 8px;
    }

    .tutorial-card {
        padding: 12px;
        margin-bottom: 10px;
    }

    .tutorial-card h3 {
        font-size: 14px;
    }

    .tutorial-card p {
        font-size: 12px;
    }

    .credential-box {
        padding: 10px 12px;
    }

    .credential-box p {
        font-size: 11px;
    }
}

/* Mobile Portrait */
@media screen and (max-width: 400px) {
    .form-box {
        padding: 20px;
    }

    .toggle-panel h1 {
        font-size: 30px;
    }

    /* Notifikasi mobile kecil */
    .notification {
        padding: 12px 16px;
        min-width: auto;
    }

    .notification-icon {
        width: 36px;
        height: 36px;
        font-size: 18px;
    }

    .notification-title {
        font-size: 14px;
    }

    .notification-message {
        font-size: 12px;
    }

    /* Tutorial mobile kecil */
    .form-box.tutorial {
        padding: 15px 10px;
    }

    .form-box.tutorial h1 {
        font-size: 20px;
    }

    .tutorial-content {
        max-height: 320px;
    }

    .tutorial-card {
        padding: 10px;
    }

    .tutorial-card h3 {
        font-size: 13px;
    }

    .tutorial-card p {
        font-size: 11px;
    }
}