* {
    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;
}

/* Canvases */
#particles,
#constellation {
    position: fixed;
    inset: 0;
}

#particles {
    z-index: 0;
}

#constellation {
    z-index: 1;
    transition: opacity 1.5s ease;
}

#constellation.hidden {
    display: none;
}

/* Register card */
.register-card {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 360px;
    padding: 32px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(16px);
    border-radius: 18px;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.6);
    color: white;
    text-align: center;
    z-index: 2;
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.hidden {
    opacity: 0;
    pointer-events: none;
}

/* Logo */
.logo {
    width: 60px;
    height: 60px;
    margin: 0 auto 14px;
    border-radius: 14px;
    background: linear-gradient(135deg, #4f46e5, #38bdf8);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 22px;
}

.subtitle {
    font-size: 13px;
    color: #cbd5f5;
    margin-bottom: 22px;
}

input {
    width: 100%;
    padding: 12px;
    margin: 8px 0;
    border-radius: 10px;
    border: none;
    background: rgba(255, 255, 255, 0.12);
    color: white;
}

::placeholder {
    color: #c7d2fe;
}

.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;
}

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

.footer {
    margin-top: 18px;
    font-size: 12px;
    color: #a5b4fc;
}


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

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

/* 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;
}