* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #1e293b;
}

.app-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Navigation */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 16px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-brand {
    font-size: 24px;
    font-weight: 700;
    color: #1e293b;
}

.nav-brand i {
    color: #667eea;
    margin-right: 8px;
}

.nav-brand .highlight {
    color: #667eea;
}

.nav-links {
    display: flex;
    gap: 24px;
}

.nav-link {
    text-decoration: none;
    color: #64748b;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 40px;
    transition: all 0.2s;
}

.nav-link:hover,
.nav-link.active {
    background: #667eea;
    color: white;
}

.reset-btn {
    background: #ef4444;
    border: none;
    padding: 8px 20px;
    border-radius: 40px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.reset-btn:hover {
    background: #dc2626;
    transform: scale(1.02);
}

/* Main Content */
.main-content {
    flex: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    width: 100%;
}

/* Form Card */
.form-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.fade-in {
    animation: fadeInUp 0.5s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card-header {
    text-align: center;
    margin-bottom: 32px;
}

.header-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #e0e7ff, #ede9fe);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

.header-icon i {
    font-size: 40px;
    color: #667eea;
}

.card-header h2 {
    font-size: 28px;
    color: #1e293b;
    margin-bottom: 8px;
}

.card-header p {
    color: #64748b;
}

/* Form Groups */
.form-group {
    margin-bottom: 24px;
}

.form-control {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.2s;
    font-family: inherit;
}

.form-control:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-control.error {
    border-color: #ef4444;
}

label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #334155;
}

label i {
    margin-right: 8px;
    color: #667eea;
}

/* Validation Messages */
.validation-msg {
    margin-top: 8px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.validation-msg.success {
    color: #10b981;
}

.validation-msg.error {
    color: #ef4444;
}

.form-hint {
    font-size: 12px;
    color: #94a3b8;
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Summary Bar */
.summary-bar {
    background: #f1f5f9;
    padding: 16px 20px;
    border-radius: 16px;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 28px;
}

.summary-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.summary-icon {
    width: 32px;
    height: 32px;
    background: #e0e7ff;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.summary-icon i {
    color: #667eea;
    font-size: 14px;
}

/* Dynamic Fields */
.dynamic-fields {
    max-height: 500px;
    overflow-y: auto;
    margin: 24px 0;
    padding-right: 8px;
}

.dynamic-fields::-webkit-scrollbar {
    width: 6px;
}

.dynamic-fields::-webkit-scrollbar-track {
    background: #e2e8f0;
    border-radius: 10px;
}

.dynamic-fields::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 10px;
}

.field-item {
    background: #f8fafc;
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.2s;
    border: 1px solid #e2e8f0;
}

.field-item:hover {
    border-color: #667eea;
    transform: translateX(5px);
}

.field-number {
    width: 45px;
    height: 45px;
    background: #667eea;
    color: white;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
}

.field-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 16px;
    font-family: inherit;
}

.field-input:focus {
    outline: none;
    border-color: #667eea;
}

.field-icon {
    color: #667eea;
    font-size: 20px;
}

/* Buttons */
.btn-group {
    display: flex;
    justify-content: flex-end;
    gap: 16px;
    margin-top: 24px;
}

.btn-primary {
    background: #667eea;
    border: none;
    padding: 14px 32px;
    border-radius: 40px;
    font-weight: 600;
    font-size: 16px;
    color: white;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary:hover {
    background: #5a67d8;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.btn-secondary {
    background: #e2e8f0;
    border: none;
    padding: 14px 32px;
    border-radius: 40px;
    font-weight: 600;
    font-size: 16px;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-secondary:hover {
    background: #cbd5e1;
}

.btn-block {
    width: 100%;
    justify-content: center;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.loading-overlay.active {
    display: flex;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading-overlay p {
    color: white;
    margin-top: 16px;
    font-size: 16px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Footer */
.footer {
    text-align: center;
    padding: 24px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
}

/* Responsive */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        text-align: center;
    }

    .nav-links {
        justify-content: center;
        flex-wrap: wrap;
    }

    .form-card {
        padding: 24px;
    }

    .field-item {
        flex-wrap: wrap;
    }

    .field-number {
        width: 100%;
    }

    .btn-group {
        flex-direction: column;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
        justify-content: center;
    }

    .card-header h2 {
        font-size: 22px;
    }
}