/* Global Reset & Background */

* {
    box-sizing: border-box;
    font-family: "Segoe UI", sans-serif;
}

body {
    margin: 0;
    height: 100vh;
    background: radial-gradient(circle at top, #0f172a, #020617);
    overflow: hidden;

    /* Needed for realistic parallax depth */
    perspective: 1000px;
}

/* Particle Background */

#particles {
    position: fixed;
    inset: 0;
    z-index: 0;
    opacity: 1;
}

/* Moon */

#moon {
    position: absolute;
    left: 50%;
    top: 50%;

    transform: translate(-50%, 120vh);

    width: 120px;
    height: 120px;
    background: radial-gradient(circle at top left, #ffffff, #c7d2fe);
    border-radius: 50%;
    box-shadow: 0 0 60px rgba(255, 255, 255, 0.6);
    z-index: 2;

    transition:
        transform 1.5s cubic-bezier(0.22, 1, 0.36, 1),
        width 1.2s cubic-bezier(0.16, 1, 0.3, 1),
        height 1.2s cubic-bezier(0.16, 1, 0.3, 1),
        border-radius 1.2s cubic-bezier(0.16, 1, 0.3, 1),
        box-shadow 1.2s cubic-bezier(0.16, 1, 0.3, 1),
        background 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Login Card */

.login-card {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 340px;
    padding: 30px;

    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);

    border-radius: 16px;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.6);
    color: white;
    text-align: center;

    z-index: 3;

    transition: opacity 0.6s ease;
    will-change: transform;
}

/* Hidden before animation */
.hidden {
    opacity: 0;
    pointer-events: none;
}

/* Logo */

.logo {
    width: 60px;
    height: 60px;
    margin: 0 auto 15px;
    border-radius: 14px;
    background: linear-gradient(135deg, #4f46e5, #38bdf8);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 22px;
}

/* Titles */

.login-card h2 {
    margin: 10px 0 5px;
}

.subtitle {
    font-size: 12px;
    color: #cbd5f5;
    margin-bottom: 20px;
}

/* Inputs & Select */

.login-card input {
    width: 100%;
    padding: 12px;
    margin: 8px 0;
    border-radius: 10px;
    border: none;
    background: rgba(255, 255, 255, 0.12);
    color: white;
    outline: none;
}

.login-card input::placeholder {
    color: #c7d2fe;
}

/* Role Toggle */

.role-toggle {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin: 8px 0;
}

.role-toggle input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.role-toggle label {
    padding: 12px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.12);
    color: #c7d2fe;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.role-toggle input:checked + label {
    border-color: #60a5fa;
    background: linear-gradient(135deg, #4f46e5, #0ea5e9);
    color: white;
}

.role-toggle label:hover {
    border-color: #93c5fd;
    color: white;
}

/* Default Button (LOGIN) */

.login-card button {
    width: 100%;
    margin-top: 15px;
    padding: 12px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #6366f1, #3b82f6);
    color: white;
    font-weight: bold;
    cursor: pointer;

    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.login-card button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(99, 102, 241, 0.5);
}

/* Divider (OR line) */

.divider {
    margin: 15px 0;
    text-align: center;
    position: relative;
    color: #cbd5f5;
    font-size: 12px;
}

.divider::before,
.divider::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 40%;
    height: 1px;
    background: rgba(255, 255, 255, 0.2);
}

.divider::before {
    left: 0;
}

.divider::after {
    right: 0;
}

/* Google Button */

.google-btn {
    width: 100%;
    padding: 12px;
    border-radius: 12px;
    border: none;
    background: linear-gradient(135deg, #db4437, #ea4335);
    color: white;
    font-weight: bold;
    cursor: pointer;

    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.google-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(234, 67, 53, 0.5);
}

/* Status Indicator */

.status {
    margin-top: 20px;
    font-size: 12px;
    color: #a5b4fc;
}

.dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: #22c55e;
    border-radius: 50%;
    margin-right: 6px;
}

/* Error Message */

.error {
    color: #f87171;
    font-size: 13px;
}

/* Register Link */

.register-link {
    margin-top: 15px;
    font-size: 12px;
    color: #c7d2fe;
}


.login-card button {
    width: 100%;
    margin-top: 15px;
    padding: 12px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #6366f1, #3b82f6);
    color: white;
    font-weight: bold;
    cursor: pointer;

    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.login-card button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(99, 102, 241, 0.5);
}

/* Divider (OR line) */

.divider {
    margin: 15px 0;
    text-align: center;
    position: relative;
    color: #cbd5f5;
    font-size: 12px;
}

.divider::before,
.divider::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 40%;
    height: 1px;
    background: rgba(255, 255, 255, 0.2);
}

.divider::before {
    left: 0;
}

.divider::after {
    right: 0;
}

/* Google Button */

.google-btn {
    width: 100%;
    padding: 12px;
    border-radius: 12px;
    border: none;
    background: linear-gradient(135deg, #db4437, #ea4335);
    color: white;
    font-weight: bold;
    cursor: pointer;

    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.google-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(234, 67, 53, 0.5);
}

/* Status Indicator */

.status {
    margin-top: 20px;
    font-size: 12px;
    color: #a5b4fc;
}

.dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: #22c55e;
    border-radius: 50%;
    margin-right: 6px;
}

/* Error Message */

.error {
    color: #f87171;
    font-size: 13px;
}

/* Register Link */

.register-link {
    margin-top: 15px;
    font-size: 12px;
    color: #c7d2fe;
}

.register-link a {
    color: #60a5fa;
    text-decoration: none;
}

.register-link a:hover {
    text-decoration: underline;
}

/* Forgot Password Styles */

.forgot-link {
    margin: 4px 0 10px;
    text-align: right;
    font-size: 12px;
}

.forgot-link a {
    color: #60a5fa;
    text-decoration: none;
    transition: color 0.2s ease;
}

.forgot-link a:hover {
    color: #93c5fd;
    text-decoration: underline;
}

.section-title {
    font-size: 14px;
    color: #c7d2fe;
    margin: 5px 0 15px;
    font-weight: 500;
}

/* Top Right Home Button */

.top-home-btn {
    position: fixed;
    top: 24px;
    right: 28px;
    z-index: 100;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 30px;
    color: #e2e8f0;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.top-home-btn:hover {
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.45), rgba(56, 189, 248, 0.45));
    border-color: #60a5fa;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 6px 22px rgba(99, 102, 241, 0.45);
}

.top-home-btn svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}
