:root {
    --primary-color: #c9a227;
    --primary-light: #e6c556;
    --primary-dark: #a68621;
    --accent-color: #5c4b1f;
    --background-color: #f0ebe3;
    --card-background: #fffdf7;
    --card-border: #c9a227;
    --text-primary: #333333;
    --text-secondary: #555555;
    --text-muted: #888888;
    --error-color: #d93025;
    --success-color: #188038;
    --input-border: #dadce0;
    --input-focus: #c9a227;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --header-height: 200px;
    --max-width: 640px;
    --border-radius: 4px;
    --transition-speed: 0.3s;
}

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

body {
    font-family: 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    background-color: var(--background-color);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

.form-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 24px 16px;
}

.header-banner {
    width: 100%;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
    overflow: hidden;
}

.header-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.card {
    background-color: var(--card-background);
    border-radius: var(--border-radius);
    border-left: 4px solid var(--card-border);
    margin-bottom: 16px;
    padding: 24px;
}

.card.title-card {
    border-radius: 0 0 var(--border-radius) var(--border-radius);
    margin-top: 0;
}

.card-title {
    font-size: 28px;
    font-weight: 400;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.card-description {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 12px;
}

.card-description strong {
    color: var(--text-primary);
}

.requirements-title {
    font-weight: 600;
    color: var(--text-primary);
    margin-top: 16px;
    margin-bottom: 8px;
}

.requirements-list {
    list-style: none;
    padding-left: 0;
}

.requirements-list li {
    color: var(--text-secondary);
    font-size: 14px;
    padding: 4px 0;
    padding-left: 16px;
    position: relative;
}

.requirements-list li::before {
    content: '-';
    position: absolute;
    left: 0;
}

.warning-text {
    color: var(--error-color);
    font-weight: 600;
    margin-top: 16px;
    font-size: 14px;
}

.section-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    gap: 16px;
}

.divider-line {
    flex: 1;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
    border-radius: 2px;
}

.divider-icon {
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    border-radius: 100%;
}

.question-card {
    background-color: var(--card-background);
    border-radius: var(--border-radius);
    border-left: 4px solid var(--card-border);
    margin-bottom: 16px;
    padding: 24px;
}

.question-label {
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 400;
    margin-bottom: 16px;
    display: block;
}

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

.input-field {
    width: 100%;
    border: none;
    border-bottom: 1px solid var(--input-border);
    padding: 8px 0;
    font-size: 14px;
    font-family: inherit;
    background: transparent;
    color: var(--text-primary);
    transition: border-color var(--transition-speed);
}

.input-field:focus {
    outline: none;
    border-bottom: 2px solid var(--input-focus);
}

.input-field::placeholder {
    color: var(--text-muted);
}

textarea.input-field {
    resize: vertical;
    min-height: 80px;
}

.date-input-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}

.date-input-wrapper input[type="text"] {
    flex: 1;
}

.date-icon {
    color: var(--text-muted);
    font-size: 18px;
    cursor: pointer;
}

.radio-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 8px;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}

.radio-option input[type="radio"] {
    appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid var(--text-muted);
    border-radius: 50%;
    cursor: pointer;
    position: relative;
    transition: border-color var(--transition-speed);
}

.radio-option input[type="radio"]:checked {
    border-color: var(--primary-color);
}

.radio-option input[type="radio"]:checked::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    background: var(--primary-color);
    border-radius: 50%;
}

.radio-option label {
    color: var(--text-secondary);
    font-size: 14px;
    cursor: pointer;
}

.checkbox-option {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
}

.checkbox-option input[type="checkbox"] {
    appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid var(--text-muted);
    border-radius: 3px;
    cursor: pointer;
    position: relative;
    transition: all var(--transition-speed);
    flex-shrink: 0;
    margin-top: 2px;
}

.checkbox-option input[type="checkbox"]:checked {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.checkbox-option input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.checkbox-option label {
    color: var(--text-secondary);
    font-size: 14px;
    cursor: pointer;
}

.form-section {
    display: none;
    animation: fadeIn 0.4s ease;
}

.form-section.active {
    display: block;
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.navigation-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 24px;
    gap: 16px;
}

.nav-btn {
    padding: 12px 32px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-speed);
    font-family: inherit;
}

.nav-btn.primary {
    background: var(--primary-color);
    color: white;
    margin-left: auto;
}

.nav-btn.primary:hover {
    background: var(--primary-dark);
}

.nav-btn.secondary {
    background: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

.nav-btn.secondary:hover {
    background: rgba(201, 162, 39, 0.1);
}

.nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.progress-indicator {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 24px;
}

.progress-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--input-border);
    transition: all var(--transition-speed);
}

.progress-dot.active {
    background: var(--primary-color);
    transform: scale(1.2);
}

.progress-dot.completed {
    background: var(--primary-light);
}

.confirmation-card {
    background: linear-gradient(135deg, #fffdf7 0%, #fef9e7 100%);
    border-left: 4px solid var(--success-color);
}

.confirmation-card .card-title {
    color: var(--success-color);
}

.confirmation-text {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 16px;
    line-height: 1.8;
}

.note-text {
    background: rgba(201, 162, 39, 0.1);
    padding: 16px;
    border-radius: var(--border-radius);
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 16px;
}

@media (max-width: 680px) {
    .form-container {
        padding: 16px 12px;
    }

    .card {
        padding: 20px 16px;
    }

    .card-title {
        font-size: 24px;
    }

    .header-banner {
        height: 160px;
    }

    .header-logo {
        width: 80px;
        height: 80px;
        font-size: 36px;
    }

    .navigation-buttons {
        flex-direction: column;
    }

    .nav-btn {
        width: 100%;
        text-align: center;
    }

    .nav-btn.primary {
        margin-left: 0;
        order: -1;
    }
}

@media (max-width: 480px) {
    .card-title {
        font-size: 20px;
    }

    .question-label {
        font-size: 13px;
    }

    .header-banner {
        height: 140px;
    }

    .header-logo {
        width: 70px;
        height: 70px;
        font-size: 32px;
    }
}

/* Discord Login Button */
.discord-login-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 14px 28px;
    background: #5865F2;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 500;
    transition: all var(--transition-speed);
    margin-left: auto;
}

.discord-login-btn:hover {
    background: #4752c4;
    transform: translateY(-1px);
}

.discord-icon {
    width: 24px;
    height: 24px;
}

/* User Header */
.user-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--card-background);
    padding: 12px 20px;
    border-radius: var(--border-radius);
    margin-bottom: 16px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
}

.user-avatar-placeholder {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 600;
    text-transform: uppercase;
}

.user-details {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 14px;
}

.user-tag {
    color: var(--text-muted);
    font-size: 12px;
}

.logout-btn {
    padding: 8px 16px;
    background: transparent;
    color: var(--text-muted);
    text-decoration: none;
    border: 1px solid var(--input-border);
    border-radius: 4px;
    font-size: 13px;
    transition: all var(--transition-speed);
}

.logout-btn:hover {
    color: var(--error-color);
    border-color: var(--error-color);
}

/* Verified Card */
.verified-card {
    border-left-color: var(--success-color);
    position: relative;
}

.verified-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #e8f5e9;
    color: var(--success-color);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 12px;
}

.verified-icon {
    width: 14px;
    height: 14px;
}

.input-readonly {
    background: #f5f5f5;
    color: var(--text-secondary);
    cursor: not-allowed;
    border-bottom-style: dashed;
}

/* Level Display */
.level-display {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px;
    background: #fafafa;
    border-radius: 6px;
}

.level-title {
    font-weight: 600;
    color: var(--primary-dark);
    font-size: 16px;
}

.level-xp {
    color: var(--text-secondary);
    font-size: 13px;
}

.level-progress {
    width: 100%;
    height: 8px;
    background: var(--input-border);
    border-radius: 4px;
    overflow: hidden;
}

.level-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-light));
    border-radius: 4px;
    transition: width 0.5s ease;
}

.level-next {
    color: var(--text-muted);
    font-size: 12px;
}

/* Warnings Notice */
.warnings-notice {
    margin-top: 12px;
    padding: 10px;
    background: #fff3e0;
    border-radius: 6px;
    border-left: 3px solid #ff9800;
}

.warning-count {
    color: #e65100;
    font-size: 13px;
    font-weight: 500;
}

.field-note {
    color: var(--text-muted);
    font-size: 12px;
    margin-top: 8px;
    font-style: italic;
}

/* Responsive adjustments for user header */
@media (max-width: 480px) {
    .user-header {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }

    .user-info {
        flex-direction: column;
    }

    .logout-btn {
        width: 100%;
        text-align: center;
    }

    .discord-login-btn {
        width: 100%;
        margin-left: 0;
    }
}

/* Success Card */
.success-card {
    text-align: center;
    border-left-color: var(--success-color);
}

.success-icon {
    width: 80px;
    height: 80px;
    background: var(--success-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    margin: 0 auto 24px;
}

.success-card .card-title {
    color: var(--success-color);
}

/* Error Card */
.error-card {
    text-align: center;
    border-left-color: var(--error-color);
}

.error-icon {
    width: 80px;
    height: 80px;
    background: var(--error-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    margin: 0 auto 24px;
}

.error-card .card-title {
    color: var(--error-color);
}

/* Next Steps */
.next-steps {
    margin: 24px 0;
    text-align: left;
}

.next-steps-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.step-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--input-border);
}

.step-item:last-child {
    border-bottom: none;
}

.step-number {
    width: 28px;
    height: 28px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    flex-shrink: 0;
}

.step-text {
    color: var(--text-secondary);
    font-size: 14px;
}

/* Footer */
.page-footer {
    text-align: center;
    padding: 24px 0;
    margin-top: 24px;
    border-top: 1px solid var(--input-border);
}

.page-footer a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 13px;
    transition: color var(--transition-speed);
}

.page-footer a:hover {
    color: var(--primary-color);
}

.footer-divider {
    color: var(--input-border);
    margin: 0 12px;
}

.footer-disclaimer {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 12px;
    opacity: 0.7;
}

/* Section Title */
.section-title {
    font-size: 18px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 12px;
}

/* Admin Panel */
.admin-panel {
    background: rgba(201, 162, 39, 0.1);
    border: 1px solid var(--primary-color);
    border-radius: var(--border-radius);
    padding: 16px;
    margin: 20px 0;
}

.admin-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 12px;
}

.admin-btn {
    padding: 10px 20px;
    border: none;
    border-radius: var(--border-radius);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-speed);
}

.admin-btn-close {
    background: var(--error-color);
    color: white;
}

.admin-btn-close:hover {
    background: #b32a21;
}

.admin-btn-open {
    background: var(--success-color);
    color: white;
}

.admin-btn-open:hover {
    background: #136f2d;
}

.admin-status {
    margin-top: 10px;
    font-size: 13px;
    color: var(--text-secondary);
}

/* Closed Notice */
.closed-notice {
    background: rgba(217, 48, 37, 0.1);
    border: 1px solid var(--error-color);
    border-radius: var(--border-radius);
    padding: 24px;
    margin: 20px 0;
    text-align: center;
}

.closed-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.closed-notice h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--error-color);
    margin-bottom: 8px;
}

.closed-notice p {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0;
}

/* Input States */
.input-field.input-filled {
    border-bottom-color: var(--success-color);
}

.input-field.input-error {
    border-bottom-color: var(--error-color);
}

.question-card.card-filled {
    border-left-color: var(--success-color);
}

/* Level Warning Modal */
.level-warning-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.level-warning-content {
    background: var(--card-background);
    border-radius: var(--border-radius);
    padding: 32px;
    max-width: 400px;
    text-align: center;
}

.level-warning-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.level-warning-content h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--error-color);
    margin-bottom: 12px;
}

.level-warning-content p {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.level-warning-content .nav-btn {
    margin-top: 16px;
}

.btn-loading {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

#submit-btn.loading {
    pointer-events: none;
    opacity: 0.8;
}