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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 50px 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
}

.header-logo {
    width: 100px;
    height: 100px;
    flex-shrink: 0;
    border-radius: 50%;
    background: white;
    padding: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    object-fit: contain;
}

.header-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: left;
}

.header h1 {
    font-size: 38px;
    font-weight: 700;
    margin: 0;
    line-height: 1.2;
}

.header p {
    font-size: 18px;
    opacity: 0.9;
    margin: 0;
    line-height: 1.4;
}

.form-container {
    padding: 40px;
}

.form-section {
    margin-bottom: 30px;
}

.section-title {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #667eea;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

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

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

label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #555;
    margin-bottom: 8px;
}

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

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"],
input[type="number"],
select,
textarea {
    width: 100%;
    padding: 12px 16px;
    font-size: 14px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-family: inherit;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="date"]:focus,
input[type="number"]:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

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

.radio-group {
    display: flex;
    gap: 20px;
    margin-top: 8px;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 8px;
}

.radio-option input[type="radio"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.radio-option label {
    margin: 0;
    cursor: pointer;
}

.voice-hint-box {
    background: linear-gradient(135deg, #f0f4ff 0%, #e8f0fe 100%);
    border: 2px solid #667eea;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.1);
}

.voice-hint-box h4 {
    color: #667eea;
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 12px 0;
}

.voice-hint-box p {
    color: #555;
    font-size: 14px;
    line-height: 1.6;
    margin: 0 0 12px 0;
    padding: 12px;
    background: white;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.voice-hint-box small {
    color: #666;
    font-size: 13px;
    display: block;
    margin-top: 8px;
}

.file-upload {
    border: 2px dashed #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
    background: #f9f9f9;
}

.file-upload:hover {
    border-color: #667eea;
    background: #f0f4ff;
}

.file-upload input[type="file"] {
    display: none;
}

.file-upload-label {
    display: inline-block;
    padding: 10px 20px;
    background: #667eea;
    color: white;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.3s ease;
}

.file-upload-label:hover {
    background: #5568d3;
}

.file-info {
    margin-top: 10px;
    font-size: 13px;
    color: #777;
}

.file-name {
    margin-top: 10px;
    font-size: 14px;
    color: #333;
    font-weight: 500;
}

.record-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    font-size: 14px;
    transition: background 0.3s ease;
}

.record-button:hover {
    background: #c0392b;
}

.record-button.recording {
    background: #27ae60;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.audio-preview {
    margin-top: 15px;
}

.audio-preview audio {
    width: 100%;
    height: 40px;
}

.submit-button {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

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

.submit-button:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.alert {
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
}

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

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

.loading {
    text-align: center;
    padding: 20px;
}

.spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

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

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .container {
        margin: 10px;
    }
    
    .header {
        padding: 30px 20px;
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .header-logo {
        width: 60px;
        height: 60px;
    }
    
    .header-content {
        text-align: center;
    }
    
    .header h1 {
        font-size: 24px;
    }
    
    .header p {
        font-size: 14px;
    }
    
    .form-container {
        padding: 20px;
    }
}

/* Success Modal Styles */
.success-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.success-modal-overlay.show {
    opacity: 1;
}

.success-modal-content {
    background: white;
    border-radius: 20px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
    overflow: hidden;
}

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

.success-modal-header {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    padding: 30px;
    text-align: center;
}

.success-icon {
    width: 80px;
    height: 80px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    font-size: 48px;
    color: #10b981;
    font-weight: bold;
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.3);
    animation: checkmark 0.5s ease 0.3s both;
}

@keyframes checkmark {
    0% {
        transform: scale(0) rotate(-45deg);
    }
    50% {
        transform: scale(1.2) rotate(10deg);
    }
    100% {
        transform: scale(1) rotate(0deg);
    }
}

.success-modal-body {
    padding: 30px;
    text-align: center;
}

.success-modal-body h2 {
    color: #333;
    font-size: 26px;
    margin: 0 0 15px 0;
    font-weight: 700;
}

.success-message {
    color: #666;
    font-size: 15px;
    margin: 0 0 20px 0;
    line-height: 1.6;
}

.application-id-box {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 2px solid #667eea;
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
}

.id-label {
    display: block;
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
    font-weight: 500;
}

.id-value {
    display: block;
    font-size: 32px;
    font-weight: 700;
    color: #667eea;
    font-family: 'Courier New', monospace;
}

.success-note {
    background: #f9fafb;
    border-left: 4px solid #10b981;
    padding: 15px;
    border-radius: 8px;
    margin: 20px 0;
    font-size: 14px;
    color: #555;
    line-height: 1.8;
    text-align: left;
}

.success-tip {
    font-size: 13px;
    color: #999;
    font-style: italic;
    margin: 15px 0 0 0;
}

.success-modal-footer {
    padding: 20px 30px 30px 30px;
    text-align: center;
}

.success-modal-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 14px 40px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.success-modal-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

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

/* Mobile responsive for success modal */
@media (max-width: 768px) {
    .success-modal-content {
        width: 95%;
        margin: 20px;
    }
    
    .success-modal-header {
        padding: 20px;
    }
    
    .success-icon {
        width: 60px;
        height: 60px;
        font-size: 36px;
    }
    
    .success-modal-body {
        padding: 20px;
    }
    
    .success-modal-body h2 {
        font-size: 22px;
    }
    
    .id-value {
        font-size: 24px;
    }
    
    .success-modal-footer {
        padding: 15px 20px 20px 20px;
    }
    
    .success-modal-btn {
        width: 100%;
    }
}
