/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 40px;
    max-width: 600px;
    width: 100%;
}

/* Header */
header {
    text-align: center;
    margin-bottom: 30px;
}

h1 {
    color: rgb(193, 63, 63);
    font-size: 2.5em;
    margin-bottom: 10px;
}

.subtitle {
    color: #666;
    font-size: 1.1em;
}

/* Language Selector */
.language-selector {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 30px;
}

.lang-btn {
    padding: 8px 16px;
    border: 2px solid #ddd;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.lang-btn:hover {
    border-color: rgb(193, 63, 63);
    color: rgb(193, 63, 63);
}

.lang-btn.active {
    background: rgb(193, 63, 63);
    color: white;
    border-color: rgb(193, 63, 63);
}

/* Form Styles */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

label {
    font-weight: 600;
    margin-bottom: 8px;
    color: #555;
}

input[type="text"],
input[type="email"],
input[type="tel"],
textarea {
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s ease;
    font-family: inherit;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
textarea:focus {
    outline: none;
    border-color: rgb(193, 63, 63);
}

textarea {
    resize: vertical;
    min-height: 120px;
}

/* Character Counter */
.char-counter {
    text-align: right;
    font-size: 12px;
    color: #666;
    margin-top: 5px;
}

/* Error Messages */
.error-message {
    color: #dc3545;
    font-size: 14px;
    margin-top: 5px;
    display: none;
}

.error-message.show {
    display: block;
}

input.error,
textarea.error {
    border-color: #dc3545;
}

/* Submit Button */
.submit-btn {
    background: rgb(193, 63, 63);
    color: white;
    padding: 14px 30px;
    border: none;
    border-radius: 6px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin-top: 20px;
}

.submit-btn:hover {
    background: rgb(163, 43, 43);
}

.submit-btn:disabled {
    background: #cccccc;
    cursor: not-allowed;
}

/* Messages */
.message {
    padding: 20px;
    border-radius: 6px;
    margin-top: 20px;
    text-align: center;
}

.success-message {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.error-message {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Loading Spinner */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid rgb(193, 63, 63);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 600px) {
    .container {
        padding: 20px;
    }

    h1 {
        font-size: 2em;
    }

    .language-selector {
        flex-wrap: wrap;
    }

    .lang-btn {
        font-size: 12px;
        padding: 6px 12px;
    }

    .submit-btn {
        font-size: 16px;
        padding: 12px 24px;
    }
}