:root {
    --primary-color: #521b08;
    --primary-dark: #3d1406;
    --primary-light: #6b2410;
    --accent-color: #d4895c;
    --text-color: #333;
    --text-light: #666;
    --border-color: #e0e0e0;
    --bg-light: #f8f9fa;
    --success-color: #27ae60;
    --error-color: #e74c3c;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background: linear-gradient(135deg, #f5f7fa 0%, #ede7e3 100%);
    min-height: 100vh;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    background: white;
    box-shadow: 0 0 40px rgba(82, 27, 8, 0.1);
}

/* Header with Logo */
.header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 3rem 2rem;
    text-align: center;
}

.logo {
    max-width: 120px;
    height: auto;
    margin-bottom: 1.5rem;
    filter: brightness(0) invert(1);
}

.logo-section h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: 2px;
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    font-weight: 300;
}

/* Hero Section */
.hero {
    padding: 3rem 2rem;
    background: var(--bg-light);
    border-bottom: 3px solid var(--primary-color);
}

.hero h2 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.1rem;
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.deadline-notice {
    background: #fff3cd;
    border-left: 4px solid var(--primary-color);
    padding: 1rem 1.5rem;
    border-radius: 4px;
    color: #856404;
    font-size: 1rem;
}

/* Form Sections */
.registration-form {
    padding: 2rem;
}

.form-section {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid var(--border-color);
}

.form-section:last-of-type {
    border-bottom: none;
}

.section-header {
    display: flex;
    align-items: center;
    margin-bottom: 2rem;
    gap: 1rem;
}

.section-number {
    background: var(--primary-color);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    font-weight: bold;
}

.section-header h3 {
    font-size: 1.8rem;
    color: var(--primary-color);
}

/* Form Grid */
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-color);
    font-size: 0.95rem;
}

.required {
    color: var(--error-color);
    margin-left: 2px;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group input[type="date"],
.form-group textarea {
    padding: 0.8rem;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(82, 27, 8, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

/* Radio and Checkbox Groups */
.radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 0.5rem;
}

.radio-label,
.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: 400;
    padding: 0.6rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    transition: all 0.3s ease;
}

.radio-label:hover,
.checkbox-label:hover {
    border-color: var(--primary-color);
    background: rgba(82, 27, 8, 0.05);
}

.radio-label input[type="radio"],
.checkbox-label input[type="checkbox"] {
    margin-right: 0.5rem;
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.checkbox-label {
    padding: 1rem;
    margin-bottom: 1rem;
    background: var(--bg-light);
}

.checkbox-label input[type="checkbox"]:checked + span {
    font-weight: 600;
}

/* Other Input */
.other-input {
    margin-top: 0.5rem;
    width: 100%;
}

/* File Upload */
.file-upload-wrapper {
    position: relative;
}

.file-upload-wrapper input[type="file"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.file-upload-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
    border: 3px dashed var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: var(--bg-light);
}

.file-upload-label:hover {
    border-color: var(--primary-color);
    background: rgba(82, 27, 8, 0.05);
}

.upload-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.upload-text {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.upload-hint {
    font-size: 0.9rem;
    color: var(--text-light);
}

.file-list {
    margin-top: 1rem;
}

.file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.8rem;
    background: var(--bg-light);
    border-radius: 6px;
    margin-bottom: 0.5rem;
}

.file-item-name {
    font-size: 0.9rem;
    color: var(--text-color);
}

.file-item-remove {
    background: var(--error-color);
    color: white;
    border: none;
    padding: 0.3rem 0.8rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
}

/* Character Count */
.char-count {
    font-size: 0.85rem;
    color: var(--text-light);
    text-align: right;
    margin-top: 0.3rem;
}

/* Declaration Section */
.declaration-section {
    display: flex;
    flex-direction: column;
}

.declaration-section a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.declaration-section a:hover {
    text-decoration: underline;
}

.signature-group {
    margin-top: 1.5rem;
}

/* Submit Section */
.submit-section {
    text-align: center;
    padding: 2rem 0;
}

.submit-btn {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    padding: 1.2rem 4rem;
    font-size: 1.2rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(82, 27, 8, 0.3);
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(82, 27, 8, 0.4);
}

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

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

.submit-note {
    margin-top: 1rem;
    font-size: 0.9rem;
    color: var(--text-light);
}

/* Prizes Section */
.prizes-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 3rem 2rem;
}

.prizes-section h3 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 2rem;
}

.prizes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.prize-item {
    background: rgba(255, 255, 255, 0.1);
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.prize-item strong {
    display: block;
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.prize-item span {
    font-size: 0.95rem;
    opacity: 0.9;
}

/* Footer */
.footer {
    background: var(--primary-color);
    color: white;
    text-align: center;
    padding: 2rem;
}

.footer p {
    margin: 0.3rem 0;
    opacity: 0.8;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6);
    animation: fadeIn 0.3s ease;
}

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

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 10px;
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-content h2 {
    background: var(--primary-color);
    color: white;
    padding: 1.5rem 2rem;
    margin: 0;
    border-radius: 10px 10px 0 0;
}

.terms-content {
    padding: 2rem;
}

.terms-content h3 {
    color: var(--primary-color);
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

.terms-content ul {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.terms-content li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.close {
    color: white;
    float: right;
    font-size: 2rem;
    font-weight: bold;
    line-height: 1;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.3s;
}

.close:hover {
    opacity: 1;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-spinner {
    text-align: center;
    color: white;
}

.spinner {
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid white;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

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

.loading-spinner p {
    font-size: 1.2rem;
    margin: 0.5rem 0;
}

.loading-note {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Responsive Design */
@media (max-width: 768px) {
    .logo {
        max-width: 100px;
    }

    .logo-section h1 {
        font-size: 1.8rem;
    }

    .hero h2 {
        font-size: 1.5rem;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .section-header h3 {
        font-size: 1.4rem;
    }

    .prizes-grid {
        grid-template-columns: 1fr;
    }

    .submit-btn {
        padding: 1rem 2rem;
        font-size: 1rem;
        width: 100%;
    }

    .radio-group {
        flex-direction: column;
    }

    .modal-content {
        width: 95%;
        margin: 10% auto;
    }
}

/* Alert Styles */
.alert {
    padding: 1rem 1.5rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-icon {
    font-size: 1.5rem;
}
