:root {
    --primary-gradient: linear-gradient(135deg, #a855f7 0%, #3b82f6 50%, #06b6d4 100%);
    --btn-gradient: linear-gradient(to right, #3b82f6, #a855f7);
    --input-focus: #a855f7;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    height: 100vh;
    width: 100vw;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #0f172a;
    overflow: hidden;
    position: relative;
}

/* --- BUBBLES CANVAS --- */
#bubble-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.bubble {
    position: absolute;
    border-radius: 50%;
    opacity: 0.9;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* --- Main Card --- */
.main-wrapper {
    perspective: 2000px;
    z-index: 10;
    width: 100%;
    display: flex;
    justify-content: center;
    padding: 20px;
}

.container {
    display: flex;
    width: 950px;
    height: 600px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 30px;
    overflow: hidden;
    transform-style: preserve-3d;
    transition: height 0.3s ease;
}

/* --- Left Side --- */
.left-panel {
    width: 45%;
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.5) 0%, rgba(59, 130, 246, 0.5) 100%);
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    z-index: 1;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.left-text {
    text-align: center;
    z-index: 2;
    transform: translateZ(30px);
}

.left-text h2 {
    font-size: 2.5rem;
    font-weight: 700;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
    margin-bottom: 5px;
}

.left-text p {
    letter-spacing: 2px;
    text-transform: uppercase;
    font-size: 0.8rem;
    font-weight: 500;
    opacity: 0.9;
}

/* --- Right Side --- */
.right-panel {
    width: 55%;
    padding: 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    transform: translateZ(20px);
}

.header-text {
    margin-bottom: 20px;
}

.header-text h3 {
    font-size: 1.5rem;
    color: #fff;
}

.header-text span {
    color: #d8b4fe;
    font-weight: 700;
    font-size: 1.6rem;
    transition: 0.3s;
}

/* Error Box */
.alert-box {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
    padding: 12px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-box.success {
    background: rgba(34, 197, 94, 0.15);
    border-color: rgba(34, 197, 94, 0.3);
    color: #86efac;
}

/* Inputs */
.input-group {
    margin-bottom: 20px;
    position: relative;
    height: 50px;
    background: rgba(255, 255, 255, 0.39);
    border-radius: 12px;
    padding: 0 15px;
    display: flex;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.53);
    transition: 0.3s;
}

.input-group i {
    color: #c7c7c7ff;
    font-size: 1.1rem;
    margin-right: 15px;
}

.input-group input,
.input-group select {
    width: 100%;
    height: 100%;
    border: none;
    outline: none;
    background: transparent;
    font-size: 1rem;
    color: #fff;
    z-index: 1;
}

.input-group label {
    position: absolute;
    left: 45px;
    top: 50%;
    transform: translateY(-50%);
    color: #ccc;
    font-size: 0.95rem;
    pointer-events: none;
    transition: 0.3s;
}

.input-group:focus-within {
    border-color: #a855f7;
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 15px rgba(168, 85, 247, 0.2);
}

.input-group:focus-within i {
    color: #a855f7;
}

.input-group input:focus+label,
.input-group input:valid+label {
    top: 0px;
    left: 20px;
    font-size: 0.75rem;
    color: #a855f7;
    background: #fff;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 600;
}

.toggle-password {
    position: absolute;
    right: 15px;
    cursor: pointer;
    color: #ddd;
    z-index: 2;
}

.submit-btn {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 50px;
    background: var(--btn-gradient);
    background-size: 200%;
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: 0.4s;
}

.submit-btn:hover {
    background-position: right;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(168, 85, 247, 0.4);
}

.options {
    display: flex;
    justify-content: space-between;
    margin-bottom: 25px;
    font-size: 0.85rem;
    color: #ccc;
}

.options a {
    color: #ccc;
    text-decoration: none;
    transition: 0.3s;
}

.options a:hover {
    color: #fff;
}

.auth-footer {
    margin-top: 25px;
    text-align: center;
    font-size: 0.9rem;
    color: #aaa;
}

.auth-link {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 500;
    transition: 0.3s;
}

.auth-link:hover {
    color: #a855f7;
}

@media (max-width: 900px) {
    .container {
        width: 100%;
        max-width: 500px;
        height: auto;
        flex-direction: column;
    }

    .left-panel {
        width: 100%;
        height: auto;
        min-height: 200px;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        padding: 30px 20px;
    }

    .left-text h2 {
        font-size: 1.5rem;
        margin-bottom: 5px;
    }

    .left-text p {
        font-size: 0.65rem;
        letter-spacing: 1px;
    }

    .right-panel {
        width: 100%;
        padding: 30px 25px;
    }

    .header-text h3 {
        font-size: 1.2rem;
    }

    .header-text span {
        font-size: 1.3rem;
    }

    .main-wrapper {
        perspective: none;
    }

    .container {
        transform: none !important;
    }
}

/* Extra small devices */
@media (max-width: 480px) {
    .main-wrapper {
        padding: 10px;
    }

    .left-panel {
        height: auto;
        min-height: 180px;
        padding: 25px 15px;
    }

    .left-text h2 {
        font-size: 1.2rem;
    }

    .left-text p {
        font-size: 0.6rem;
        letter-spacing: 0.5px;
    }

    .right-panel {
        padding: 25px 20px;
    }

    .header-text h3 {
        font-size: 1.1rem;
    }

    .header-text span {
        font-size: 1.2rem;
    }

    .input-group {
        height: 45px;
        padding: 0 12px;
    }

    .input-group i {
        font-size: 1rem;
        margin-right: 10px;
    }

    .input-group input,
    .input-group select {
        font-size: 0.9rem;
    }

    .submit-btn {
        padding: 12px;
        font-size: 1rem;
    }
}