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

:root {
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --success: #10b981;
    --error: #ef4444;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-900: #111827;
    --border-radius: 8px;
    --spacing: 1.5rem;
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    color: var(--gray-900);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 1rem;
}

.container {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
}

.form-wrapper {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.form-header {
    padding: 2rem 1.5rem 1.5rem;
    text-align: center;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
    color: white;
}

.form-header h1 {
    font-size: 1.75rem;
    font-weight: 600;
}

.contact-form {
    padding: 2rem 1.5rem;
}

.input-group {
    margin-bottom: var(--spacing);
}

.field-label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--gray-700);
    text-align: left;
}

.input-group input,
.input-group textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--gray-300);
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-family: inherit;
    background: white;
    transition: all 0.2s ease;
    appearance: none;
    -webkit-appearance: none;
    min-height: 48px;
}

.input-group input::placeholder,
.input-group textarea::placeholder {
    color: var(--gray-400);
    opacity: 1;
}

.input-group input:focus,
.input-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgb(37 99 235 / 0.1);
}

.input-group input:hover:not(:focus),
.input-group textarea:hover:not(:focus) {
    border-color: var(--gray-400);
}

.input-group textarea {
    resize: vertical;
    min-height: 120px;
    font-family: inherit;
}

.checkbox-group {
    margin-bottom: calc(var(--spacing) + 0.5rem);
}

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

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--gray-600);
    padding: 0.5rem 0;
}

.checkbox-custom {
    width: 20px;
    height: 20px;
    min-width: 20px;
    border: 2px solid var(--gray-300);
    border-radius: 4px;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    margin-top: 2px;
}

.checkbox-custom::after {
    content: '';
    width: 6px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg) scale(0);
    transition: transform 0.2s ease;
}

input[type="checkbox"]:checked + .checkbox-label .checkbox-custom {
    background: var(--primary);
    border-color: var(--primary);
}

input[type="checkbox"]:checked + .checkbox-label .checkbox-custom::after {
    transform: rotate(45deg) scale(1);
}

input[type="checkbox"]:focus + .checkbox-label .checkbox-custom {
    box-shadow: 0 0 0 3px rgb(37 99 235 / 0.1);
}

.submit-btn {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
    margin-top: 0.5rem;
    min-height: 52px;
}

.submit-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

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

.submit-btn:disabled {
    cursor: not-allowed;
    opacity: 0.8;
    transform: none;
}

.btn-text {
    display: inline-block;
    transition: opacity 0.2s ease;
}

.btn-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.submit-btn.loading .btn-text {
    opacity: 0;
}

.submit-btn.loading .btn-loader {
    opacity: 1;
}

.spinner {
    width: 22px;
    height: 22px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.form-status {
    margin-top: var(--spacing);
    padding: 1rem;
    border-radius: var(--border-radius);
    font-size: 0.9rem;
    font-weight: 500;
    text-align: center;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.form-status.show {
    opacity: 1;
    transform: translateY(0);
}

.form-status.success {
    background: #ecfdf5;
    color: var(--success);
    border: 1px solid #bbf7d0;
}

.form-status.error {
    background: #fef2f2;
    color: var(--error);
    border: 1px solid #fecaca;
}

@media (max-width: 480px) {
    body {
        padding: 0.5rem;
    }
    
    .form-header {
        padding: 1.5rem 1rem 1rem;
    }
    
    .form-header h1 {
        font-size: 1.5rem;
    }
    
    .contact-form {
        padding: 1.5rem 1rem;
    }
    
    .input-group input,
    .input-group textarea {
        font-size: 16px;
        min-height: 52px;
    }
    
    .field-label {
        font-size: 0.9rem;
    }
    
    .checkbox-label {
        font-size: 0.85rem;
    }
}
