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

html {
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-attachment: fixed;
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 15px;
    min-height: 100vh;
}

header {
    text-align: center;
    margin-bottom: 30px;
    padding: 40px 25px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #1e3c72;
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

h1 {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    margin-bottom: 15px;
    font-weight: 700;
    background: linear-gradient(135deg, #1e3c72, #2a5298);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    font-size: clamp(1rem, 2.5vw, 1.1rem);
    opacity: 0.8;
    color: #555;
    font-weight: 500;
}

.section {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 25px;
    margin-bottom: 20px;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.section:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.section h2 {
    color: #1e3c72;
    margin-bottom: 25px;
    font-size: clamp(1.3rem, 3vw, 1.8rem);
    position: relative;
    padding-bottom: 12px;
    font-weight: 600;
}

.section h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background: linear-gradient(135deg, #2a5298, #667eea);
    border-radius: 2px;
}

.question {
    margin-bottom: 25px;
    position: relative;
}

.question label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #444;
    font-size: clamp(0.9rem, 2vw, 1rem);
    line-height: 1.4;
}

select, input[type="email"], input[type="tel"] {
    width: 100%;
    padding: 16px 18px;
    border: 2px solid #e8ecf0;
    border-radius: 12px;
    font-size: 16px;
    font-family: inherit;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.9);
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

select {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' 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;
    padding-right: 50px;
}

select:focus, input[type="email"]:focus, input[type="tel"]:focus {
    outline: none;
    border-color: #2a5298;
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 0 0 3px rgba(42, 82, 152, 0.1), 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

/* Phone number validation styles */
input[name="phone"].phone-valid {
    border-color: #00ff88 !important;
    background: rgba(0, 255, 136, 0.05) !important;
    box-shadow: 0 0 0 3px rgba(0, 255, 136, 0.1), 0 4px 12px rgba(0, 0, 0, 0.1) !important;
}

input[name="phone"].phone-invalid {
    border-color: #ff6b6b !important;
    background: rgba(255, 107, 107, 0.05) !important;
    box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.1), 0 4px 12px rgba(0, 0, 0, 0.1) !important;
}

/* Phone help text styling */
.phone-help {
    font-size: 0.8em;
    color: #666;
    font-weight: normal;
    font-style: italic;
}

/* Email validation styles */
input[name="email"].email-valid {
    border-color: #00ff88 !important;
    background: rgba(0, 255, 136, 0.05) !important;
    box-shadow: 0 0 0 3px rgba(0, 255, 136, 0.1), 0 4px 12px rgba(0, 0, 0, 0.1) !important;
}

input[name="email"].email-invalid {
    border-color: #ff6b6b !important;
    background: rgba(255, 107, 107, 0.05) !important;
    box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.1), 0 4px 12px rgba(0, 0, 0, 0.1) !important;
}

/* Privacy consent styles */
.privacy-consent {
    margin-top: 30px;
    padding: 20px;
    background: rgba(42, 82, 152, 0.05);
    border: 1px solid rgba(42, 82, 152, 0.2);
    border-radius: 8px;
}

.consent-checkbox {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    margin-bottom: 15px;
    font-size: 0.9rem;
    line-height: 1.5;
}

.consent-checkbox input[type="checkbox"] {
    display: none;
}

.checkmark-custom {
    width: 20px;
    height: 20px;
    border: 2px solid #e1e8ed;
    border-radius: 4px;
    margin-right: 12px;
    margin-top: 2px;
    flex-shrink: 0;
    position: relative;
    background: white;
    transition: all 0.3s ease;
}

.consent-checkbox:hover .checkmark-custom {
    border-color: #2a5298;
}

.consent-checkbox input[type="checkbox"]:checked + .checkmark-custom {
    background: #2a5298;
    border-color: #2a5298;
}

.consent-checkbox input[type="checkbox"]:checked + .checkmark-custom::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-weight: bold;
    font-size: 14px;
}

.consent-text {
    color: #555;
    flex: 1;
}

.privacy-links {
    text-align: center;
    margin-top: 15px;
    font-size: 0.9rem;
}

.privacy-link {
    color: #2a5298;
    text-decoration: none;
    transition: color 0.3s ease;
}

.privacy-link:hover {
    color: #1e3c72;
    text-decoration: underline;
}

/* Privacy modal styles */
.privacy-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content {
    background: white;
    border-radius: 12px;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid #e1e8ed;
    background: #f8f9fa;
    border-radius: 12px 12px 0 0;
}

.modal-header h3 {
    margin: 0;
    color: #1e3c72;
    font-size: 1.5rem;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    padding: 5px;
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: #333;
}

.modal-body {
    padding: 25px;
    line-height: 1.6;
    color: #333;
}

.modal-body h4 {
    color: #1e3c72;
    margin: 20px 0 10px 0;
    font-size: 1.1rem;
}

.modal-body h4:first-child {
    margin-top: 0;
}

.modal-body p {
    margin-bottom: 15px;
}

.modal-body ul {
    margin-bottom: 15px;
    padding-left: 20px;
}

.modal-body li {
    margin-bottom: 5px;
}

.modal-body em {
    color: #666;
    font-size: 0.9rem;
}

/* Mobile responsive modal */
@media (max-width: 600px) {
    .privacy-modal {
        padding: 10px;
    }
    
    .modal-content {
        max-height: 90vh;
    }
    
    .modal-header {
        padding: 15px 20px;
    }
    
    .modal-header h3 {
        font-size: 1.3rem;
    }
    
    .modal-body {
        padding: 20px;
    }
}

.radio-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    margin-top: 12px;
}

.radio-group label {
    display: flex;
    align-items: center;
    font-weight: 500;
    cursor: pointer;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.7);
    border: 2px solid #e8ecf0;
    border-radius: 10px;
    transition: all 0.3s ease;
    margin-bottom: 0;
}

.radio-group label:hover {
    background: rgba(42, 82, 152, 0.05);
    border-color: #2a5298;
    transform: translateY(-1px);
}

.radio-group input[type="radio"] {
    margin-right: 10px;
    cursor: pointer;
    width: 18px;
    height: 18px;
    accent-color: #2a5298;
}

.radio-group input[type="radio"]:checked + span {
    color: #2a5298;
    font-weight: 600;
}

.info-text {
    text-align: center;
    color: #666;
    margin-bottom: 25px;
    font-style: italic;
    font-size: clamp(0.9rem, 2vw, 1rem);
    padding: 15px;
    background: rgba(42, 82, 152, 0.05);
    border-radius: 10px;
    border-left: 4px solid #2a5298;
}

.submit-section {
    text-align: center;
    margin-top: 40px;
    padding: 30px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

#submitBtn {
    background: linear-gradient(135deg, #2a5298 0%, #667eea 100%);
    color: white;
    padding: 18px 45px;
    border: none;
    border-radius: 50px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(42, 82, 152, 0.3);
    position: relative;
    overflow: hidden;
    min-width: 200px;
}

#submitBtn::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;
}

#submitBtn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(42, 82, 152, 0.4);
}

#submitBtn:hover::before {
    left: 100%;
}

#submitBtn:active {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(42, 82, 152, 0.3);
}

#submitBtn:disabled {
    background: linear-gradient(135deg, #ccc 0%, #999 100%);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.disclaimer {
    margin-top: 20px;
    font-size: 0.9em;
    color: #666;
    line-height: 1.5;
}

/* Safari specific fixes */
@supports (-webkit-appearance: none) {
    select {
        -webkit-appearance: none;
    }
    
    input[type="email"], input[type="tel"] {
        -webkit-appearance: none;
        -webkit-border-radius: 12px;
    }
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    header {
        padding: 30px 20px;
        margin-bottom: 20px;
    }
    
    .section {
        padding: 20px;
        margin-bottom: 15px;
    }
    
    .radio-group {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .radio-group label {
        padding: 14px 16px;
    }
    
    #submitBtn {
        padding: 16px 35px;
        font-size: 16px;
        width: 100%;
        max-width: 300px;
    }
    
    .question {
        margin-bottom: 20px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 8px;
    }
    
    header {
        padding: 25px 15px;
    }
    
    .section {
        padding: 18px;
    }
    
    select, input[type="email"], input[type="tel"] {
        padding: 14px 16px;
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .radio-group label {
        padding: 12px 14px;
        font-size: 14px;
    }
}

/* Loading animation */
.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid transparent;
    border-top: 2px solid #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Focus improvements for accessibility */
*:focus {
    outline: 2px solid #2a5298;
    outline-offset: 2px;
}

.radio-group input[type="radio"]:focus {
    outline: 2px solid #2a5298;
    outline-offset: 2px;
}