:root {
    /* Brand Colors - Premium Dark Theme */
    --primary: #a855f7;
    --primary-glow: #c084fc;
    --accent: #22d3ee;
    --accent-glow: #67e8f9;
    --bg-dark: #0f0f1a;
    --bg-card: rgba(20, 20, 35, 0.85);
    --bg-card-hover: rgba(30, 30, 50, 0.95);
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-muted: rgba(255, 255, 255, 0.5);
    --border-glow: rgba(168, 85, 247, 0.3);
    --success: #10b981;
    --error: #ef4444;
    --radius-sm: 12px;
    --radius-md: 20px;
    --radius-lg: 28px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-dark);
    min-height: 100vh;
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Animated Background */
.background-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(168, 85, 247, 0.3), transparent),
        radial-gradient(ellipse 60% 40% at 100% 50%, rgba(34, 211, 238, 0.15), transparent),
        radial-gradient(ellipse 60% 40% at 0% 80%, rgba(168, 85, 247, 0.2), transparent);
    pointer-events: none;
    z-index: 0;
    animation: pulseBackground 8s ease-in-out infinite alternate;
}

@keyframes pulseBackground {
    0% {
        opacity: 0.8;
    }

    100% {
        opacity: 1;
    }
}

/* Floating Orbs */
body::before,
body::after {
    content: '';
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    z-index: 0;
    animation: float 15s ease-in-out infinite;
}

body::before {
    width: 400px;
    height: 400px;
    background: var(--primary);
    top: -100px;
    right: -100px;
}

body::after {
    width: 300px;
    height: 300px;
    background: var(--accent);
    bottom: 10%;
    left: -50px;
    animation-delay: -7s;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-30px) rotate(5deg);
    }
}

.container {
    max-width: 680px;
    margin: 0 auto;
    padding: 40px 20px 60px;
    position: relative;
    z-index: 1;
}

/* Header */
header {
    text-align: center;
    margin-bottom: 48px;
    padding-top: 20px;
}

header h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--primary-glow) 50%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 12px;
    letter-spacing: -0.5px;
}

.subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    font-weight: 300;
}

/* Cards - Glassmorphism */
.card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow:
        0 25px 50px -12px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    overflow: hidden;
    margin-bottom: 32px;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow:
        0 30px 60px -15px rgba(0, 0, 0, 0.6),
        0 0 40px -10px rgba(168, 85, 247, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.card.hidden {
    display: none;
}

.card-header {
    padding: 28px 32px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.card-header p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.card-body {
    padding: 32px;
}

/* Pulse Indicator */
.pulse-indicator {
    width: 12px;
    height: 12px;
    background: var(--success);
    border-radius: 50%;
    position: relative;
}

.pulse-indicator::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    background: var(--success);
    opacity: 0.5;
    animation: pulse 2s ease-out infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.5;
    }

    100% {
        transform: scale(2.5);
        opacity: 0;
    }
}

/* Event Card */
.event-title {
    font-size: clamp(1.5rem, 4vw, 2.2rem);
    font-weight: 700;
    margin-bottom: 24px;
    line-height: 1.2;
    background: linear-gradient(135deg, var(--text-primary), var(--primary-glow));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.event-details {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 32px;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 1.05rem;
    color: var(--text-secondary);
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: background 0.3s, border-color 0.3s;
}

.detail-item:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(168, 85, 247, 0.2);
}

.icon {
    font-size: 1.4rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 18px 36px;
    border-radius: 100px;
    font-weight: 600;
    font-size: 1.05rem;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 40%, rgba(255, 255, 255, 0.2) 50%, transparent 60%);
    transform: translateX(-100%);
    transition: transform 0.6s;
}

.btn:hover::before {
    transform: translateX(100%);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, #9333ea 100%);
    color: white;
    box-shadow:
        0 10px 30px -5px rgba(168, 85, 247, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    width: 100%;
}

.btn-primary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow:
        0 15px 40px -5px rgba(168, 85, 247, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.btn-submit {
    background: linear-gradient(135deg, var(--accent) 0%, #06b6d4 100%);
    color: #0f172a;
    box-shadow:
        0 10px 30px -5px rgba(34, 211, 238, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    width: 100%;
    font-size: 1.15rem;
    padding: 20px 40px;
}

.btn-submit:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow:
        0 15px 40px -5px rgba(34, 211, 238, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* Loading State */
.loading-state {
    text-align: center;
    padding: 80px 40px;
}

.spinner {
    width: 56px;
    height: 56px;
    border: 3px solid rgba(168, 85, 247, 0.2);
    border-top: 3px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 24px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.loading-state p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* Waiver Form */
.waiver-intro {
    text-align: center;
    margin-bottom: 36px;
    font-size: 1.1rem;
    color: var(--text-secondary);
}

.waiver-intro small {
    display: block;
    margin-top: 8px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.form-section {
    margin-bottom: 40px;
}

.form-section h4 {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--primary-glow);
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(168, 85, 247, 0.2);
    display: flex;
    align-items: center;
    gap: 10px;
}

.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.input-group input {
    width: 100%;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-family: inherit;
    color: var(--text-primary);
    transition: all 0.3s;
}

.input-group input::placeholder {
    color: var(--text-muted);
}

.input-group input:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(168, 85, 247, 0.05);
    box-shadow: 0 0 0 4px rgba(168, 85, 247, 0.1);
}

/* Waiver Items */
.waiver-item {
    background: rgba(255, 255, 255, 0.02);
    border-radius: var(--radius-md);
    padding: 24px;
    margin-bottom: 16px;
    display: flex;
    gap: 24px;
    align-items: flex-start;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}

.waiver-item:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(168, 85, 247, 0.15);
    transform: translateX(4px);
}

.waiver-item.highlight-item {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.1), rgba(34, 211, 238, 0.05));
    border-color: rgba(168, 85, 247, 0.25);
}

.waiver-text {
    flex: 1;
}

.waiver-text h5 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.waiver-text p {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* Custom Checkbox */
.checkbox-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    min-width: 70px;
    color: var(--text-muted);
    user-select: none;
}

.checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    height: 28px;
    width: 28px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    position: relative;
    transition: all 0.3s;
}

.checkbox-container:hover .checkmark {
    border-color: var(--primary);
    background: rgba(168, 85, 247, 0.1);
}

.checkbox-container input:checked~.checkmark {
    background: linear-gradient(135deg, var(--success), #059669);
    border-color: var(--success);
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.4);
}

.checkmark::after {
    content: "";
    position: absolute;
    display: none;
}

.checkbox-container input:checked~.checkmark::after {
    display: block;
}

.checkbox-container .checkmark::after {
    left: 10px;
    top: 5px;
    width: 6px;
    height: 12px;
    border: solid white;
    border-width: 0 2.5px 2.5px 0;
    transform: rotate(45deg);
}

.divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(168, 85, 247, 0.3), transparent);
    margin: 40px 0;
}

/* Footer */
.card-footer {
    padding: 24px 32px;
    text-align: center;
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.back-link {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.3s;
}

.back-link:hover {
    color: var(--primary-glow);
}

/* Status Messages */
.status-message {
    margin-top: 24px;
    padding: 18px 24px;
    border-radius: var(--radius-sm);
    text-align: center;
    font-weight: 500;
    font-size: 1rem;
}

.status-message.success {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(16, 185, 129, 0.05));
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-message.error {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15), rgba(239, 68, 68, 0.05));
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.status-message.hidden {
    display: none;
}

/* Form Actions */
.form-actions {
    margin-top: 40px;
}

/* Mobile Responsiveness */
@media (max-width: 640px) {
    .container {
        padding: 24px 16px 48px;
    }

    .card-header,
    .card-body {
        padding: 24px 20px;
    }

    .waiver-item {
        flex-direction: column;
        gap: 18px;
    }

    .checkbox-container {
        flex-direction: row;
        width: 100%;
        padding-top: 14px;
        border-top: 1px solid rgba(255, 255, 255, 0.05);
        gap: 12px;
    }

    .btn {
        padding: 16px 28px;
        font-size: 1rem;
    }
}

/* Smooth Entrance Animation */
.card {
    animation: fadeInUp 0.6s ease-out backwards;
}

.event-card {
    animation-delay: 0.1s;
}

.waiver-card {
    animation-delay: 0.2s;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Attendee Selector */
.attendee-select {
    width: 100%;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    font-size: 1.1rem;
    font-family: inherit;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23a855f7' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 20px;
}

.attendee-select:focus {
    outline: none;
    border-color: var(--primary);
    background-color: rgba(168, 85, 247, 0.05);
    box-shadow: 0 0 0 4px rgba(168, 85, 247, 0.1);
}

.attendee-select option {
    background: #1a1a2e;
    color: var(--text-primary);
    padding: 12px;
}

/* Attendee Cards */
.attendee-card {
    background: rgba(168, 85, 247, 0.08);
    border: 1px solid rgba(168, 85, 247, 0.2);
    border-radius: var(--radius-md);
    padding: 24px;
    margin-bottom: 20px;
    animation: fadeInUp 0.4s ease-out;
}

.attendee-card h5 {
    color: var(--primary-glow);
    font-size: 1rem;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.attendee-card .input-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.attendee-card .input-group {
    margin-bottom: 0;
}

.attendee-card .input-group.full-width {
    grid-column: 1 / -1;
}

@media (max-width: 640px) {
    .attendee-card .input-row {
        grid-template-columns: 1fr;
    }
}

/* Master Agreement */
.master-agreement {
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.1), rgba(168, 85, 247, 0.1));
    border: 2px solid rgba(34, 211, 238, 0.3);
    border-radius: var(--radius-md);
    padding: 24px;
    margin-top: 32px;
}

.checkbox-container-large {
    display: flex;
    align-items: center;
    gap: 16px;
    cursor: pointer;
    user-select: none;
}

.checkbox-container-large input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark-large {
    height: 32px;
    width: 32px;
    min-width: 32px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    position: relative;
    transition: all 0.3s;
}

.checkbox-container-large:hover .checkmark-large {
    border-color: var(--accent);
    background: rgba(34, 211, 238, 0.1);
}

.checkbox-container-large input:checked~.checkmark-large {
    background: linear-gradient(135deg, var(--success), #059669);
    border-color: var(--success);
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.5);
}

.checkmark-large::after {
    content: "";
    position: absolute;
    display: none;
    left: 11px;
    top: 6px;
    width: 8px;
    height: 14px;
    border: solid white;
    border-width: 0 3px 3px 0;
    transform: rotate(45deg);
}

.checkbox-container-large input:checked~.checkmark-large::after {
    display: block;
}

.agree-text {
    font-size: 1.05rem;
    color: var(--text-primary);
    line-height: 1.4;
}

.agree-text strong {
    color: var(--accent);
}