body {
    box-sizing: border-box;
    margin: 0;
    padding: 20px;
    font-family: 'DM Sans', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;    
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

* {
    box-sizing: border-box;
}

.contact-container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    max-width: 600px;
    width: 100%;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.contact-container:hover {
    transform: translateY(-5px);
}

.contact-header {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    padding: 40px 30px;
    text-align: center;
    color: white;
}

.contact-header h1 {
    margin: 0 0 10px;
    font-size: 2.5rem;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.contact-header p {
    margin: 0;
    font-size: 1.1rem;
    opacity: 0.9;
}

.contact-form {
    padding: 40px 30px;
}

.form-group {
    margin-bottom: 25px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 1rem;
}

.form-label .required {
    color: #e74c3c;
    margin-left: 3px;
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 15px;
    border: 2px solid #e1e8ed;
    border-radius: 10px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
    background: #fafbfc;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: #4facfe;
    background: white;
    box-shadow: 0 0 0 3px rgba(79, 172, 254, 0.1);
}

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

.form-input.error,
.form-textarea.error,
.form-select.error {
    border-color: #e74c3c;
    background: #fdf2f2;
}

.form-input.success,
.form-textarea.success,
.form-select.success {
    border-color: #27ae60;
    background: #f8fff8;
}

.error-message {
    display: none;
    color: #e74c3c;
    font-size: 0.9rem;
    margin-top: 8px;
    padding: 8px 12px;
    background: #fdf2f2;
    border-radius: 6px;
    border-left: 3px solid #e74c3c;
}

.error-message.show {
    display: block;
}

.submit-button {
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.submit-button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.submit-button:focus {
    outline: 3px solid #4facfe;
    outline-offset: 2px;
}

.submit-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.success-message {
    display: none;
    background-color: #56ab2f;
    color: white;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    margin-bottom: 20px;
    font-weight: 500;
    box-shadow: 0 4px 15px rgba(86, 171, 47, 0.3);
}

.success-message.show {
    display: block;
    animation: slideIn 0.5s ease;
}

.success-message h3 {
    margin: 0 0 10px;
    font-size: 1.3rem;
}

.success-message p {
    margin: 0;
    opacity: 0.9;
}

/* Character counter */
.char-counter {
    text-align: right;
    font-size: 0.85rem;
    color: #666;
    margin-top: 5px;
}

.char-counter.warning {
    color: #f39c12;
}

.char-counter.error {
    color: #e74c3c;
}

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

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

/* Animations */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.shake {
    animation: shake 0.5s ease-in-out;
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .contact-header {
        padding: 30px 20px;
    }

    .contact-header h1 {
        font-size: 2rem;
    }

    .contact-form {
        padding: 30px 20px;
    }

    .form-input,
    .form-textarea,
    .form-select {
        padding: 12px;
    }

    .submit-button {
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .contact-header h1 {
        font-size: 1.8rem;
    }

    .contact-header p {
        font-size: 1rem;
    }

    .form-group {
        margin-bottom: 20px;
    }
}

/* Focus styles for accessibility */
*:focus {
    outline: 2px solid #4facfe;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .form-input,
    .form-textarea,
    .form-select {
        border-width: 3px;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}