@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
    --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    
    --bg-dark: #070913;
    --card-bg: rgba(17, 19, 40, 0.75);
    --card-border: rgba(255, 255, 255, 0.06);
    
    --primary: #5f5ceb;
    --primary-glow: rgba(95, 92, 235, 0.4);
    --secondary: #ec4899;
    --secondary-glow: rgba(236, 72, 153, 0.4);
    
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --text-placeholder: #64748b;
    
    --input-bg: rgba(9, 10, 23, 0.8);
    --input-border: rgba(255, 255, 255, 0.1);
    --input-focus: #5f5ceb;
    
    --success: #10b981;
    --error: #ef4444;
}

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

body {
    background-color: var(--bg-dark);
    font-family: var(--font-body);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow-x: hidden;
    padding: 2rem 1rem;
}

/* Background animated glow meshes */
body::before, body::after {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    filter: blur(140px);
    z-index: -1;
    opacity: 0.4;
    pointer-events: none;
    animation: pulse 12s infinite alternate;
}

body::before {
    background: radial-gradient(circle, var(--primary) 0%, transparent 70%);
    top: -200px;
    left: -200px;
}

body::after {
    background: radial-gradient(circle, var(--secondary) 0%, transparent 70%);
    bottom: -200px;
    right: -200px;
    animation-delay: 6s;
}

@keyframes pulse {
    0% { transform: scale(1) translate(0, 0); }
    100% { transform: scale(1.15) translate(50px, 50px); }
}

/* Layout container */
.container {
    width: 100%;
    max-width: 700px;
    z-index: 1;
}

/* Glassmorphic Card */
.glass-card {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--card-border);
    border-radius: 24px;
    padding: 2.5rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.glass-card:hover {
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4), 0 0 30px rgba(95, 92, 235, 0.08);
}

/* Typography */
.card-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.card-title {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #ffffff 30%, #a5b4fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
}

.card-subtitle {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Form Styles */
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    position: relative;
}

.form-group.full-width {
    grid-column: span 2;
}

.form-label {
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 0.5rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    transition: color 0.3s ease;
}

.form-group:focus-within .form-label {
    color: var(--primary);
}

.form-control {
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 12px;
    padding: 0.85rem 1rem;
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--text-main);
    outline: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
}

.form-control::placeholder {
    color: var(--text-placeholder);
}

.form-control:focus {
    border-color: var(--input-focus);
    box-shadow: 0 0 0 4px var(--primary-glow);
}

/* Textarea height */
textarea.form-control {
    min-height: 110px;
    resize: vertical;
}

/* Custom Select & Choice Chips */
.chips-container {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 0.25rem;
}

.chip {
    flex: 1;
    min-width: 100px;
    position: relative;
    cursor: pointer;
}

.chip input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.chip-content {
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 12px;
    padding: 0.85rem 0.5rem;
    text-align: center;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
    transition: all 0.3s ease;
    user-select: none;
}

.chip:hover .chip-content {
    border-color: rgba(255, 255, 255, 0.2);
    color: var(--text-main);
}

.chip input:checked + .chip-content {
    background: linear-gradient(135deg, rgba(95, 92, 235, 0.2) 0%, rgba(236, 72, 153, 0.2) 100%);
    border-color: var(--primary);
    color: var(--text-main);
    box-shadow: 0 0 15px rgba(95, 92, 235, 0.15);
}

/* Error styles */
.error-msg {
    color: var(--error);
    font-size: 0.75rem;
    margin-top: 0.4rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
    animation: fadeIn 0.3s ease;
}

.form-control.is-invalid {
    border-color: var(--error);
}

.form-control.is-invalid:focus {
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.2);
}

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

/* Submit Button */
.btn-submit {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border: none;
    border-radius: 12px;
    color: #ffffff;
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 700;
    padding: 1rem 2rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
    margin-top: 1rem;
    box-shadow: 0 4px 15px rgba(95, 92, 235, 0.3);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.btn-submit:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(95, 92, 235, 0.4), 0 0 15px rgba(236, 72, 153, 0.2);
}

.btn-submit:active:not(:disabled) {
    transform: translateY(1px);
}

.btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background: var(--text-placeholder);
    box-shadow: none;
}

/* Loader Spinner */
.spinner {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsiveness */
@media (max-width: 600px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .form-group.full-width {
        grid-column: span 1;
    }
    
    .glass-card {
        padding: 1.5rem;
        border-radius: 16px;
    }
    
    .card-title {
        font-size: 1.8rem;
    }
}

/* Thank you page special styling */
.thank-you-card {
    text-align: center;
    max-width: 550px;
}

.success-icon-wrapper {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(16, 185, 129, 0.1);
    border: 2px solid var(--success);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 2rem;
    color: var(--success);
    position: relative;
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.15);
}

.success-icon-wrapper svg {
    width: 40px;
    height: 40px;
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
    animation: drawCheck 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards 0.2s;
}

@keyframes drawCheck {
    to { stroke-dashoffset: 0; }
}

.btn-back {
    display: inline-block;
    background: transparent;
    border: 1px solid var(--input-border);
    color: var(--text-main);
    text-decoration: none;
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 600;
    padding: 0.85rem 1.75rem;
    border-radius: 12px;
    transition: all 0.3s ease;
    margin-top: 2rem;
}

.btn-back:hover {
    border-color: var(--primary);
    background: rgba(95, 92, 235, 0.05);
    color: #ffffff;
    transform: translateY(-1px);
}

/* Space Starfield Canvas Background */
#space-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -2;
    pointer-events: none;
}

