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

body {
    background: linear-gradient(135deg, #0f0f1b 0%, #1a1a2e 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 16px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #e2e8f0;
}

.contact-card {
    background: rgba(20, 20, 35, 0.85);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: 
        0 15px 35px -10px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.05);
    padding: 32px 28px;
    width: 100%;
    max-width: 480px;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
    animation: cardAppear 0.6s cubic-bezier(0.23, 1, 0.32, 1) forwards;
    opacity: 0;
    transform: translateY(30px) scale(0.97);
}

@keyframes cardAppear {
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.contact-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(120deg, 
        transparent 0%, 
        rgba(102, 126, 234, 0.03) 25%, 
        transparent 50%, 
        rgba(118, 75, 162, 0.03) 75%, 
        transparent 100%);
    background-size: 200% 200%;
    animation: gradientShift 8s ease-in-out infinite;
    pointer-events: none;
    z-index: 1;
}

@keyframes gradientShift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

.card-header {
    text-align: center;
    margin-bottom: 28px;
    position: relative;
    z-index: 2;
}

.card-header::after {
    content: '';
    display: block;
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, #667eea, #8a6bff);
    margin: 16px auto;
    border-radius: 1px;
    opacity: 0.7;
}

.card-header h1 {
    font-family: 'Space Grotesk', sans-serif;
    color: #ffffff;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 12px;
    letter-spacing: -0.4px;
    line-height: 1.2;
}

.card-header p {
    color: #a0aec0;
    font-size: 15px;
    line-height: 1.5;
    max-width: 380px;
    margin: 0 auto;
    font-weight: 400;
}

.form-group {
    margin-bottom: 24px;
    position: relative;
    z-index: 2;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    color: #ffffff;
    font-weight: 600;
    font-size: 14px;
    letter-spacing: -0.2px;
}

.form-control {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    font-size: 15px;
    color: #ffffff;
    background: rgba(30, 30, 46, 0.6);
    backdrop-filter: blur(8px);
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
    font-family: 'Inter', sans-serif;
    font-weight: 400;
}

.form-control:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.25);
    background: rgba(30, 30, 46, 0.8);
    transform: translateY(-1px);
}

.form-control::placeholder {
    color: #718096;
    opacity: 1;
}

/* Custom select styling */
.custom-select {
    position: relative;
}

.custom-select::after {
    content: '▼';
    position: absolute;
    top: 50%;
    right: 16px;
    transform: translateY(-50%) rotate(0deg);
    color: #718096;
    font-size: 12px;
    pointer-events: none;
    transition: transform 0.3s ease;
}

.form-control:focus + .custom-select::after,
.custom-select select:focus + ::after {
    transform: translateY(-50%) rotate(180deg);
    color: #667eea;
}

select.form-control {
    appearance: none;
    background: transparent;
    cursor: pointer;
    padding-right: 36px;
}

select.form-control option {
    background: rgba(20, 20, 35, 0.95);
    color: #e2e8f0;
}

select.form-control:focus {
    outline: none;
}

.submit-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #667eea 0%, #8a6bff 100%);
    color: white;
    border: none;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
    text-transform: none;
    letter-spacing: 0.2px;
    font-family: 'Inter', sans-serif;
    position: relative;
    overflow: hidden;
    z-index: 2;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 8px 20px -4px rgba(102, 126, 234, 0.4),
        0 6px 8px -5px rgba(102, 126, 234, 0.3);
}

.submit-btn:active {
    transform: translateY(0);
}

.submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.success-message {
    background: rgba(34, 197, 94, 0.15);
    color: #ffffff;
    padding: 18px;
    border-radius: 14px;
    text-align: center;
    margin-top: 24px;
    display: none;
    animation: messageSlideIn 0.5s cubic-bezier(0.23, 1, 0.32, 1) forwards;
    border: 1px solid rgba(34, 197, 94, 0.3);
    backdrop-filter: blur(8px);
    z-index: 2;
    position: relative;
}

@keyframes messageSlideIn {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.error-message {
    color: #f56565;
    font-size: 13px;
    margin-top: 8px;
    display: none;
    font-weight: 500;
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Staggered animation for form elements */
.form-group {
    opacity: 0;
    transform: translateY(15px);
}

.form-group.visible {
    animation: slideUp 0.5s cubic-bezier(0.23, 1, 0.32, 1) forwards;
}

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

/* Loading state */
.submit-btn.loading {
    position: relative;
    color: transparent;
}

.submit-btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 18px;
    height: 18px;
    border: 2px solid transparent;
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* Mobile Responsive */
@media (max-width: 480px) {
    .contact-card {
        padding: 24px 20px;
        margin: 12px;
    }
    
    .card-header h1 {
        font-size: 24px;
    }
    
    .card-header p {
        font-size: 14px;
    }
    
    .form-control {
        padding: 12px 16px;
        font-size: 14px;
    }
    
    .custom-select::after {
        right: 14px;
        font-size: 11px;
    }
    
    select.form-control {
        padding-right: 32px;
    }
    
    .submit-btn {
        padding: 14px;
        font-size: 15px;
    }
    
    .success-message {
        padding: 16px;
        font-size: 14px;
    }
}