/* ============================================
   INSCRIPTION PAGE — matches the dark theme
   ============================================ */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
    --bg-deep: #0a0e1a;
    --bg-card: #111827;
    --bg-input: #0f172a;
    --accent: #6ee7b7;
    --accent-glow: rgba(110, 231, 183, 0.35);
    --accent2: #818cf8;
    --accent2-glow: rgba(129, 140, 248, 0.35);
    --danger: #f87171;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #475569;
    --border: #1e293b;
    --border-focus: #6ee7b7;
    --radius: 16px;
    --radius-sm: 10px;
    --shadow-card: 0 8px 32px rgba(0,0,0,0.3);
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* ============================================
   BODY & BACKGROUND
   ============================================ */
body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-deep);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    overflow-x: hidden;
}

body::before, body::after {
    content: '';
    position: fixed;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.12;
    pointer-events: none;
    z-index: 0;
    animation: blobDrift 12s ease-in-out infinite alternate;
}
body::before {
    width: 500px; height: 500px;
    background: var(--accent2);
    top: -100px; right: -150px;
}
body::after {
    width: 400px; height: 400px;
    background: var(--accent);
    bottom: -80px; left: -120px;
    animation-delay: -6s;
}
@keyframes blobDrift {
    0%  { transform: translate(0, 0) scale(1); }
    100% { transform: translate(60px, 40px) scale(1.15); }
}

.page-grid-overlay {
    position: fixed; inset: 0;
    background-image:
        linear-gradient(rgba(129,140,248,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(129,140,248,0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
    z-index: 0;
}

/* ============================================
   INSCRIPTION CARD
   ============================================ */

/* Maintenance banner */
.maintenance-banner {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 500px;
    background: linear-gradient(135deg, var(--warning), #f59e0b);
    color: #f59e0b;
    padding: 12px 16px;
    margin-bottom: 16px;
    border-radius: var(--radius-sm);
    text-align: center;
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: 0 4px 12px var(--warning-glow);
    animation: slideDown 0.5s cubic-bezier(0.4, 0, 0.2, 1) both;
}

.inscription-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 420px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
    padding: 40px 32px 28px;
    text-align: center;
    animation: slideDown 0.5s cubic-bezier(0.4, 0, 0.2, 1) both;
    backdrop-filter: blur(8px);
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-24px); }
    to   { opacity: 1; transform: translateY(0); }
}

.inscription-container .card-icon {
    width: 52px; height: 52px;
    margin: 0 auto 18px;
    background: linear-gradient(135deg, var(--accent2), var(--accent));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 4px 18px var(--accent2-glow);
    animation: iconBounce 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.2s both;
}
@keyframes iconBounce {
    from { opacity: 0; transform: scale(0.4) rotate(-10deg); }
    to   { opacity: 1; transform: scale(1) rotate(0deg); }
}

.inscription-container h2 {
    font-size: 1.55rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
    letter-spacing: -0.5px;
}

.inscription-container .subtitle {
    color: var(--text-muted);
    font-size: 0.82rem;
    margin-bottom: 26px;
}

/* Inputs */
.inscription-container input {
    width: 100%;
    padding: 12px 16px;
    margin: 7px 0;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.9rem;
    transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}
.inscription-container input::placeholder {
    color: var(--text-muted);
}
.inscription-container input:focus {
    outline: none;
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px var(--accent-glow);
    transform: translateX(3px);
}

/* Input valid / invalid states */
.inscription-container input.valid {
    border-color: var(--accent);
}
.inscription-container input.invalid {
    border-color: var(--danger);
    animation: shake 0.4s ease;
}
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%      { transform: translateX(-6px); }
    40%      { transform: translateX(6px); }
    60%      { transform: translateX(-4px); }
    80%      { transform: translateX(4px); }
}

/* Submit button */
.inscription-container button#reg-button {
    width: 100%;
    padding: 12px;
    margin-top: 14px;
    background: linear-gradient(135deg, var(--accent2), #6366f1);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-family: inherit;
    font-size: 0.92rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    transition: transform var(--transition), box-shadow var(--transition), filter var(--transition), opacity var(--transition);
    position: relative;
    overflow: hidden;
}
.inscription-container button#reg-button::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 40%, rgba(255,255,255,0.15) 100%);
    pointer-events: none;
}
.inscription-container button#reg-button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--accent2-glow);
    filter: brightness(1.1);
}
.inscription-container button#reg-button:active:not(:disabled) {
    transform: translateY(0);
}
.inscription-container button#reg-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    filter: grayscale(0.4);
}

/* Error message */
.error-message {
    color: #fca5a5;
    font-size: 0.8rem;
    margin: 10px 0 4px;
    padding: 10px 12px;
    background: rgba(248, 113, 113, 0.1);
    border: 1px solid rgba(248, 113, 113, 0.25);
    border-radius: var(--radius-sm);
    text-align: left;
    animation: slideIn 0.3s ease;
}
@keyframes slideIn {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Back link */
.back-link {
    margin-top: 20px;
}
.back-link a {
    color: var(--accent);
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 500;
    transition: color var(--transition), text-shadow var(--transition);
}
.back-link a:hover {
    color: #fff;
    text-shadow: 0 0 10px var(--accent-glow);
}

/* ============================================
   SUCCESS OVERLAY (confetti + checkmark)
   ============================================ */
.success-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 14, 26, 0.85);
    backdrop-filter: blur(6px);
    z-index: 100;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}
.success-overlay.visible {
    opacity: 1;
    pointer-events: auto;
}

/* Checkmark circle */
.success-circle {
    width: 120px; height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), #34d399);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 40px var(--accent-glow);
    transform: scale(0);
    animation: none;
}
.success-overlay.visible .success-circle {
    animation: circleIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) 0.15s both;
}
@keyframes circleIn {
    from { transform: scale(0) rotate(-30deg); }
    to   { transform: scale(1) rotate(0deg); }
}

/* SVG checkmark stroke animation */
.success-circle svg {
    width: 56px; height: 56px;
    overflow: visible;
}
.success-circle svg .check-path {
    fill: none;
    stroke: #0a0e1a;
    stroke-width: 8;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 80;
    stroke-dashoffset: 80;
    transition: stroke-dashoffset 0.5s ease 0.55s;
}
.success-overlay.visible .check-path {
    stroke-dashoffset: 0;
}

/* Success text */
.success-text {
    margin-top: 28px;
    text-align: center;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.4s ease 0.8s, transform 0.4s ease 0.8s;
}
.success-overlay.visible .success-text {
    opacity: 1;
    transform: translateY(0);
}
.success-text h2 {
    font-size: 1.6rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
}
.success-text p {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ============================================
   CONFETTI CANVAS
   ============================================ */
#confetti-canvas {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 101;
}