:root {
    --bg-1: #0f1724;
    --bg-2: #122334;
    --card: rgba(255, 255, 255, 0.03);
    --accent: #7c5cff;
    --accent-2: #00d4ff;
    --muted: rgba(255, 255, 255, 0.65);
    --danger: #ff5c6c;
    --success: #3ee3a2;
    --glass: rgba(255, 255, 255, 0.04);
    --radius: 14px;
    --input-h: 48px;
    --shadow-sm: 0 6px 18px rgba(2, 6, 23, 0.6);
    --transition: 220ms cubic-bezier(.2, .9, .3, 1);
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial;
    color-scheme: dark;
}

/* Page layout */
* {
    box-sizing: border-box
}

html,
body,
main {
    height: 100%
}

body {
    margin: 0;
    min-height: 100vh;
    background: radial-gradient(1200px 600px at 10% 10%, rgba(124, 92, 255, 0.12), transparent 8%),
        radial-gradient(900px 500px at 90% 90%, rgba(0, 212, 255, 0.06), transparent 10%),
        linear-gradient(180deg, var(--bg-1), var(--bg-2));
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Card */
main {
    width: 100%;
    max-width: 760px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.01));
    border-radius: calc(var(--radius) + 6px);
    padding: 28px;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(6px) saturate(120%);
}

/* Header */
main h1 {
    font-size: 20px;
    font-weight: 600;
    color: #eef1ff;
    letter-spacing: 0.2px;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Form layout */
form {
    display: grid;
    gap: 14px;
    grid-template-columns: 1fr 1fr;
    align-items: end;
}

/* Make each field span full width (label + input) */
form>div {
    grid-column: span 2;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Label */
form label {
    font-size: 13px;
    color: var(--muted);
    display: inline-block;
}

/* Inputs */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"] {
    height: var(--input-h);
    padding: 10px 14px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.01));
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    color: #eef1ff;
    font-size: 15px;
    outline: none;
    transition: box-shadow var(--transition), transform var(--transition), border-color var(--transition);
    -webkit-appearance: none;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.02) inset;
}

/* Placeholder style */
::placeholder {
    color: rgba(255, 255, 255, 0.25);
    opacity: 1;
}

/* Focus state */
input:focus {
    border-color: rgba(124, 92, 255, 0.9);
    box-shadow: 0 6px 30px rgba(124, 92, 255, 0.12);
    transform: translateY(-1px);
}

/* Valid / invalid */
input.valid {
    border-color: rgba(62, 227, 162, 0.85);
    box-shadow: 0 6px 20px rgba(62, 227, 162, 0.06);
}

input.not-valid {
    border-color: rgba(255, 92, 108, 0.95);
    box-shadow: 0 6px 20px rgba(255, 92, 108, 0.06);
}

/* Helper messages (spans) */
span {
    color: var(--muted);
    font-size: 12px;
    line-height: 1;
    display: none;
    /* default hidden as in HTML */
}

span[style] {
    /* keep inline styles shown by JS */
}

#nameInfo,
#emailInfo,
#passwordInfo,
#Confirm-password-info,
#numInfo {
    margin-top: 4px;
    color: rgba(255, 255, 255, 0.65);
}

/* Submit button design */
input[type="submit"] {
    grid-column: 1 / -1;
    cursor: pointer;
    height: 52px;
    border-radius: 12px;
    border: none;
    font-weight: 700;
    font-size: 15px;
    letter-spacing: 0.2px;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    color: #071028;
    box-shadow: 0 10px 30px rgba(7, 16, 40, 0.6), 0 3px 8px rgba(124, 92, 255, 0.14);
    transition: transform var(--transition), box-shadow var(--transition), opacity var(--transition);
    -webkit-tap-highlight-color: transparent;
}

input[type="submit"]:active {
    transform: translateY(1px)
}

input[type="submit"]:hover {
    box-shadow: 0 14px 40px rgba(7, 16, 40, 0.7), 0 6px 18px rgba(124, 92, 255, 0.18)
}

/* notValid message */
#notValid {
    grid-column: 1 / -1;
    text-align: center;
    color: var(--danger);
    display: none;
    /* shown by JS when invalid */
    font-weight: 600;
}

/* Success panel */
#success {
    margin-top: 18px;
    padding: 18px;
    border-radius: 10px;
    background: linear-gradient(90deg, rgba(62, 227, 162, 0.06), rgba(124, 92, 255, 0.03));
    border: 1px solid rgba(62, 227, 162, 0.06);
    display: none;
    /* shown by JS */
}

#success h1 {
    font-size: 16px;
    color: #eafff4;
    font-weight: 700;
    margin: 0;
}

/* Small screens: stack nicely */
@media (max-width:640px) {
    main {
        padding: 20px;
        border-radius: 12px
    }

    form {
        grid-template-columns: 1fr;
        gap: 12px
    }

    input[type="submit"] {
        height: 50px
    }

    h1 {
        font-size: 18px
    }
}

/* Accessibility: focus-visible ring */
:focus-visible {
    outline: 3px solid rgba(124, 92, 255, 0.18);
    outline-offset: 2px;
    border-radius: 8px;
}

/* Micro-interactions for helper text reveal (nicely animate block elements shown by JS) */
@keyframes slideDownFade {
    from {
        opacity: 0;
        transform: translateY(-6px)
    }

    to {
        opacity: 1;
        transform: translateY(0)
    }
}

span[style*="display: block"],
#notValid[style*="display: block"],
#success[style*="display: block"] {
    animation: slideDownFade 260ms ease both;
}

/* Optional: subtle floating labels effect (if you add .floating class later) */
.floating label {
    position: relative;
    transform-origin: left top;
    transition: transform 180ms ease, font-size 180ms ease;
}