/* ===== CSS Custom Properties ===== */
:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-card: rgba(20, 20, 30, 0.6);
    --bg-input: rgba(30, 30, 45, 0.5);

    --text-primary: #ffffff;
    --text-secondary: #a0a0b0;
    --text-muted: #606070;

    --accent-primary: #8b5cf6;
    --accent-secondary: #06b6d4;
    --accent-gradient: linear-gradient(135deg, #8b5cf6 0%, #06b6d4 50%, #10b981 100%);
    --accent-glow: rgba(139, 92, 246, 0.4);

    --border-subtle: rgba(255, 255, 255, 0.08);
    --border-focus: rgba(139, 92, 246, 0.5);

    --shadow-soft: 0 4px 24px rgba(0, 0, 0, 0.3);
    --shadow-glow: 0 0 40px rgba(139, 92, 246, 0.2);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;

    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --transition-fast: 0.2s ease;
    --transition-medium: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* ===== Reset & Base ===== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-family);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

/* ===== Animated Background ===== */
.bg-gradient {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(ellipse at 20% 20%, rgba(139, 92, 246, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(6, 182, 212, 0.12) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(16, 185, 129, 0.08) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
}

.bg-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
    z-index: 0;
}

.floating-orbs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
    animation: float 20s ease-in-out infinite;
}

.orb-1 {
    width: 400px;
    height: 400px;
    background: var(--accent-primary);
    top: -100px;
    right: -100px;
    animation-delay: 0s;
}

.orb-2 {
    width: 300px;
    height: 300px;
    background: var(--accent-secondary);
    bottom: 20%;
    left: -80px;
    animation-delay: -7s;
}

.orb-3 {
    width: 250px;
    height: 250px;
    background: #10b981;
    top: 60%;
    right: 10%;
    animation-delay: -14s;
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(30px, -30px) scale(1.05);
    }

    66% {
        transform: translate(-20px, 20px) scale(0.95);
    }
}

/* ===== Container ===== */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 1;
}

/* ===== Welcome Section ===== */
.welcome-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 0;
}

.welcome-content {
    animation: fadeInUp 1s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.logo-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    background: var(--accent-gradient);
    border-radius: var(--radius-lg);
    margin-bottom: 32px;
    box-shadow: var(--shadow-glow);
    animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        box-shadow: 0 0 40px rgba(139, 92, 246, 0.3);
    }

    50% {
        box-shadow: 0 0 60px rgba(139, 92, 246, 0.5);
    }
}

.logo-icon {
    font-size: 36px;
}

.title {
    font-size: clamp(3rem, 10vw, 5rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 24px;
}

.title-gradient {
    display: block;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.title-sub {
    display: block;
    font-weight: 300;
    font-size: 0.5em;
    color: var(--text-secondary);
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.tagline {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 500px;
    margin: 0 auto 40px;
    line-height: 1.7;
}

/* Stats Row */
.stats-row {
    display: flex;
    justify-content: center;
    gap: 48px;
    margin-bottom: 48px;
}

.stat {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* CTA Button */
.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 18px 40px;
    background: var(--accent-gradient);
    color: white;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 50px;
    transition: all var(--transition-medium);
    box-shadow: 0 4px 24px rgba(139, 92, 246, 0.3);
    position: relative;
    overflow: hidden;
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.cta-button:hover::before {
    left: 100%;
}

.cta-button:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 40px rgba(139, 92, 246, 0.4);
}

.arrow-icon {
    width: 20px;
    height: 20px;
    transition: transform var(--transition-fast);
}

.cta-button:hover .arrow-icon {
    transform: translateX(5px);
}

/* Scroll Indicator */
.scroll-indicator {
    margin-top: 60px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    color: var(--text-muted);
    font-size: 0.875rem;
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(10px);
    }
}

.mouse {
    width: 26px;
    height: 40px;
    border: 2px solid var(--text-muted);
    border-radius: 20px;
    display: flex;
    justify-content: center;
    padding-top: 8px;
}

.wheel {
    width: 4px;
    height: 8px;
    background: var(--accent-primary);
    border-radius: 2px;
    animation: scroll 2s ease-in-out infinite;
}

@keyframes scroll {

    0%,
    100% {
        opacity: 1;
        transform: translateY(0);
    }

    50% {
        opacity: 0.3;
        transform: translateY(8px);
    }
}

/* ===== Form Section ===== */
.form-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 80px 0;
}

.form-wrapper {
    max-width: 600px;
    margin: 0 auto;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    padding: 48px;
    box-shadow: var(--shadow-soft);
    position: relative;
}

.form-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--accent-gradient);
}

.form-header {
    text-align: center;
    margin-bottom: 40px;
}

.form-badge {
    display: inline-block;
    padding: 8px 16px;
    background: rgba(139, 92, 246, 0.15);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 50px;
    font-size: 0.875rem;
    color: var(--accent-primary);
    margin-bottom: 16px;
}

.form-header h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.form-header p {
    color: var(--text-secondary);
}

/* Form Groups */
.form-group {
    margin-bottom: 24px;
    position: relative;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 600px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 10px;
    color: var(--text-secondary);
}

.label-icon {
    font-size: 1rem;
}

.optional-tag {
    margin-left: auto;
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 400;
}

.required-tag {
    margin-left: auto;
    font-size: 0.75rem;
    color: #f87171;
    font-weight: 500;
}

/* Other Role Group Animation */
.other-role-group {
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

input,
select,
textarea {
    width: 100%;
    padding: 16px 20px;
    background: var(--bg-input);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: var(--font-family);
    font-size: 1rem;
    transition: all var(--transition-fast);
    outline: none;
}

input::placeholder,
textarea::placeholder {
    color: var(--text-muted);
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--border-focus);
    background: rgba(40, 40, 60, 0.5);
    box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.1);
}

/* Select Wrapper */
.select-wrapper {
    position: relative;
}

select {
    appearance: none;
    cursor: pointer;
    padding-right: 48px;
}

.select-arrow {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.75rem;
    pointer-events: none;
}

textarea {
    resize: vertical;
    min-height: 120px;
}

/* Input Glow Effect */
.input-glow {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--accent-gradient);
    transition: width var(--transition-medium);
    border-radius: 2px;
}

.form-group:focus-within .input-glow {
    width: 100%;
}

/* ===== Custom Select Dropdown ===== */
.custom-select {
    position: relative;
    width: 100%;
}

.custom-select-trigger {
    width: 100%;
    padding: 16px 20px;
    background: var(--bg-input);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: var(--font-family);
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all var(--transition-fast);
}

.custom-select-trigger:hover {
    border-color: var(--border-focus);
    background: rgba(40, 40, 60, 0.5);
}

.custom-select.open .custom-select-trigger {
    border-color: var(--border-focus);
    background: rgba(40, 40, 60, 0.5);
    box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.1);
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.select-placeholder {
    color: var(--text-muted);
}

.select-value {
    display: flex;
    align-items: center;
    gap: 10px;
}

.select-value-icon {
    font-size: 1.1rem;
}

.select-chevron {
    width: 18px;
    height: 18px;
    color: var(--text-muted);
    transition: transform var(--transition-fast);
}

.custom-select.open .select-chevron {
    transform: rotate(180deg);
}

.custom-options {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(25, 25, 40, 0.98);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-focus);
    border-top: none;
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: all var(--transition-medium);
    z-index: 100;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.custom-select.open .custom-options {
    max-height: 400px;
    overflow-y: auto;
    opacity: 1;
}

.custom-option {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 20px;
    cursor: pointer;
    transition: all var(--transition-fast);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.custom-option:last-child {
    border-bottom: none;
}

.custom-option:hover {
    background: rgba(139, 92, 246, 0.15);
}

.custom-option.selected {
    background: rgba(139, 92, 246, 0.25);
}

.custom-option.selected::after {
    content: '✓';
    margin-left: auto;
    color: var(--accent-primary);
    font-weight: 600;
}

.option-icon {
    font-size: 1.5rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-sm);
    flex-shrink: 0;
}

.option-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.option-title {
    font-weight: 500;
    color: var(--text-primary);
}

.option-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Custom scrollbar for options */
.custom-options::-webkit-scrollbar {
    width: 6px;
}

.custom-options::-webkit-scrollbar-track {
    background: transparent;
}

.custom-options::-webkit-scrollbar-thumb {
    background: rgba(139, 92, 246, 0.3);
    border-radius: 3px;
}

.custom-options::-webkit-scrollbar-thumb:hover {
    background: rgba(139, 92, 246, 0.5);
}

/* Submit Button */
.submit-button {
    width: 100%;
    padding: 18px 32px;
    background: var(--accent-gradient);
    border: none;
    border-radius: var(--radius-md);
    color: white;
    font-family: var(--font-family);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: all var(--transition-medium);
    position: relative;
    overflow: hidden;
    margin-top: 16px;
}

.submit-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.submit-button:hover::before {
    left: 100%;
}

.submit-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(139, 92, 246, 0.4);
}

.submit-button:active {
    transform: translateY(0);
}

.btn-icon {
    width: 20px;
    height: 20px;
    transition: transform var(--transition-fast);
}

.submit-button:hover .btn-icon {
    transform: translate(3px, -3px);
}

.btn-loader {
    display: none;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.submit-button.loading .btn-text,
.submit-button.loading .btn-icon {
    display: none;
}

.submit-button.loading .btn-loader {
    display: block;
}

/* Success Message */
.success-message {
    display: none;
    text-align: center;
    padding: 40px 20px;
    animation: fadeInUp 0.5s ease;
}

.success-message.show {
    display: block;
}

.success-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #10b981, #06b6d4);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: white;
    margin: 0 auto 24px;
    box-shadow: 0 8px 32px rgba(16, 185, 129, 0.3);
}

.success-message h3 {
    font-size: 1.75rem;
    margin-bottom: 12px;
}

.success-message p {
    color: var(--text-secondary);
    margin-bottom: 32px;
}

.reset-button {
    padding: 14px 28px;
    background: transparent;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: var(--font-family);
    font-size: 1rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.reset-button:hover {
    background: var(--bg-input);
    border-color: var(--accent-primary);
}

/* Hide form when success */
#volunteer-form.hidden {
    display: none;
}

/* ===== Footer ===== */
.footer {
    text-align: center;
    padding: 32px;
    color: var(--text-muted);
    font-size: 0.875rem;
    border-top: 1px solid var(--border-subtle);
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .form-wrapper {
        padding: 32px 24px;
        margin: 0 16px;
    }

    .stats-row {
        gap: 32px;
    }

    .stat-number {
        font-size: 1.5rem;
    }

    .cta-button {
        padding: 16px 32px;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }

    .title {
        font-size: 2.5rem;
    }

    .tagline {
        font-size: 1rem;
    }

    .stats-row {
        gap: 24px;
    }

    .form-header h2 {
        font-size: 1.5rem;
    }

    input,
    select,
    textarea {
        padding: 14px 16px;
    }
}

/* ===== Scroll Animations ===== */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}