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

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

.container {
    width: 100%;
    max-width: 600px;
}

.card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    padding: 40px;
    animation: slideIn 0.5s ease-out;
}

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

h1 {
    color: #333;
    margin-bottom: 10px;
    font-size: 28px;
}

.level-badge {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.subtitle {
    color: #666;
    margin-bottom: 30px;
    font-size: 14px;
}

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

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

input[type="tel"],
select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 5px;
    font-size: 14px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    font-family: inherit;
}

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

input[type="tel"]::placeholder {
    color: #999;
}

small {
    display: block;
    margin-top: 5px;
    color: #999;
    font-size: 12px;
}

.button-group {
    display: flex;
    gap: 10px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.btn {
    flex: 1;
    min-width: 150px;
    padding: 12px 20px;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

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

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

.btn-secondary {
    background: #f5f5f5;
    color: #333;
    border: 2px solid #667eea;
}

.btn-secondary:hover {
    background: #667eea;
    color: white;
}

.btn-info {
    background: #17a2b8;
    color: white;
}

.btn-info:hover {
    background: #138496;
    transform: translateY(-2px);
}

.btn-small {
    flex: none;
    min-width: 100px;
    padding: 8px 15px;
    font-size: 12px;
}

.response-box,
.requests-box {
    margin-top: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 5px;
    border-left: 4px solid #667eea;
    animation: fadeIn 0.3s ease-in;
}

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

.response-box h3,
.requests-box h3 {
    margin-bottom: 15px;
    color: #333;
    font-size: 16px;
}

pre {
    background: white;
    padding: 15px;
    border-radius: 5px;
    overflow-x: auto;
    font-size: 12px;
    color: #333;
    border: 1px solid #e0e0e0;
    max-height: 300px;
    overflow-y: auto;
}

#requestsContent {
    max-height: 400px;
    overflow-y: auto;
}

.request-item {
    background: white;
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 5px;
    border-left: 4px solid #17a2b8;
}

.request-item strong {
    color: #333;
}

.request-item p {
    margin: 5px 0;
    color: #666;
    font-size: 13px;
}

.level-tag {
    display: inline-block;
    background: #667eea;
    color: white;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 11px;
    margin: 2px 2px 2px 0;
}

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

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

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

.loading p {
    color: #667eea;
    font-weight: 600;
}

.error {
    color: #dc3545;
}

.success {
    color: #28a745;
}

.info-box {
    margin-top: 30px;
    padding: 15px;
    background: #e7f3ff;
    border-radius: 5px;
    border-left: 4px solid #17a2b8;
    font-size: 13px;
}

.info-box p {
    margin: 5px 0;
    color: #004085;
}

.info-box strong {
    color: #00254d;
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease-in;
}

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

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

.modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px 20px;
    text-align: center;
}

.modal-header h2 {
    margin: 0;
    font-size: 32px;
    font-weight: 700;
}

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

.progress-text {
    font-size: 18px;
    color: #333;
    margin-bottom: 20px;
    font-weight: 600;
}

.progress-text strong {
    color: #667eea;
    font-size: 20px;
}

.progress-bar-container {
    width: 100%;
    height: 12px;
    background: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    margin: 20px 0;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    transition: width 0.6s ease-out;
}

.progress-percentage {
    font-size: 14px;
    color: #666;
    margin: 10px 0;
    font-weight: 600;
}

.encouragement-message {
    font-size: 16px;
    color: #333;
    margin: 20px 0 0 0;
    line-height: 1.5;
    font-weight: 500;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-footer {
    background: #f8f9fa;
    padding: 20px;
    text-align: center;
    border-top: 1px solid #e0e0e0;
}

.modal-footer .btn {
    min-width: 200px;
}

/* Error Modal Styles */
.modal-error {
    max-width: 450px;
}

.error-header {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
}

.error-message {
    font-size: 20px;
    color: #dc3545;
    margin-bottom: 10px;
    font-weight: 700;
}

.error-submessage {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    margin-top: 15px;
}

@media (max-width: 480px) {
    .card {
        padding: 25px;
    }

    h1 {
        font-size: 24px;
    }

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

    .btn {
        min-width: unset;
    }
}
