* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, #0f0f23 0%, #1a1a2e 50%, #16213e 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 20% 80%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(139, 92, 246, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(59, 130, 246, 0.1) 0%, transparent 50%);
    z-index: -1;
    animation: backgroundFloat 20s ease-in-out infinite;
}

@keyframes backgroundFloat {

    0%,
    100% {
        transform: translateY(0px) rotate(0deg);
    }

    50% {
        transform: translateY(-20px) rotate(1deg);
    }
}

.container {
    max-width: 750px;
    width: 100%;
    position: relative;
}

.form-container {
    background: rgba(17, 24, 39, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 35px;
    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(99, 102, 241, 0.2);
    position: relative;
    overflow: hidden;
    animation: slideInUp 0.8s ease-out;
}

.form-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #20b9dc, #6bc075, #3b82f6);
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes shimmer {

    0%,
    100% {
        transform: translateX(-100%);
    }

    50% {
        transform: translateX(100%);
    }
}

.form-title {
    text-align: center;
    margin-bottom: 30px;
    color: #f8fafc;
    font-size: 2.2rem;
    font-weight: 700;
    position: relative;
}

.form-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, #20b9dc, #6bc075);
    border-radius: 2px;
}

.form-group {
    margin-bottom: 20px;
    animation: fadeInUp 0.6s ease-out forwards;
    opacity: 0;
    transform: translateY(20px);
}

.form-group:nth-child(1) {
    animation-delay: 0.1s;
}

.form-group:nth-child(2) {
    animation-delay: 0.2s;
}

.form-group:nth-child(3) {
    animation-delay: 0.3s;
}

.form-group:nth-child(4) {
    animation-delay: 0.4s;
}

.form-group:nth-child(5) {
    animation-delay: 0.5s;
}

.form-group:nth-child(6) {
    animation-delay: 0.6s;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.input-container {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #20b9dc;
    font-size: 1rem;
    z-index: 2;
}

label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #e5e7eb;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

input,
select {
    width: 100%;
    padding: 12px 18px 12px 42px;
    border: 2px solid #374151;
    border-radius: 10px;
    background: #1f2937;
    color: #f8fafc;
    font-size: 0.95rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

input:focus,
select:focus {
    outline: none;
    border-color: #6bc075;
    background: #111827;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.2);
    transform: translateY(-2px);
}

input::placeholder {
    color: #9ca3af;
}

select option {
    background: #1f2937;
    color: #f8fafc;
}

.error-message {
    font-size: 0.8rem;
    color: #ef4444;
    margin-top: 5px;
    display: block;
    font-weight: 500;
}

.input-error {
    border-color: #ef4444 !important;
    background: #1f1214 !important;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.2) !important;
}

.section-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #f8fafc;
    margin-bottom: 15px;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 8px;
}

.custom-select-wrapper {
    position: relative;
}

.interactive-select {
    padding: 12px 18px 12px 42px !important;
    cursor: pointer;
    font-weight: 500;
}

.button-group {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.choice-btn,
.category-btn {
    padding: 10px 20px;
    border-radius: 22px;
    background: #1f2937;
    border: 2px solid #374151;
    color: #e5e7eb;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 6px;
}

.choice-btn:hover,
.category-btn:hover {
    transform: translateY(-2px);
    border-color: #20b9dc;
    background: #111827;
    box-shadow: 0 2px 20px rgba(99, 102, 241, 0.3);
}

.choice-btn.active,
.category-btn.active {
    background: linear-gradient(135deg, #20b9dc, #6bc075);
    border-color: #008673;
    color: white;
    box-shadow: 0 2px 20px rgba(99, 102, 241, 0.4);
}

.submit-btn {
    width: 100%;
    padding: 14px;
    border: none;
    background: linear-gradient(135deg, #20b9dc, #6bc075);
    color: white;
    border-radius: 10px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.submit-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s;
}

.submit-btn:hover {
    transform: translateY(-3px);
    background: linear-gradient(135deg, #137f45ba, #20b9dc);
    box-shadow: 0 15px 35px rgba(99, 102, 241, 0.5);
}

.submit-btn:hover::before {
    left: 100%;
}

.submit-btn.loading {
    opacity: 0.8;
    pointer-events: none;
    transform: scale(0.98);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

#categorySection {
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateY(-10px);
}

#categorySection.show {
    opacity: 1;
    max-height: 200px;
    transform: translateY(0);
}

.dynamic-fields {
    margin-top: 15px;
    opacity: 0;
    animation: slideInDown 0.5s ease-out forwards;
}

.dynamic-field-group.three-columns {
    display: flex;
    gap: 15px;
}

.dynamic-field-group.three-columns .form-group {
    flex: 1;
}

.dynamic-field-group.two-columns {
    display: flex;
    gap: 15px;
}

.dynamic-field-group.two-columns .form-group {
    flex: 1;
}




@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dynamic-field-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    animation: fadeInUp 0.6s ease-out forwards;
    opacity: 0;
    transform: translateY(20px);
}

/* Responsive Design */
@media (max-width: 768px) {
    .form-container {
        padding: 25px 18px;
    }

    .form-title {
        font-size: 1.9rem;
    }

    .form-row,
    .dynamic-field-group {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .button-group {
        justify-content: center;
    }

    input,
    select {
        padding: 11px 14px 11px 38px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 8px;
    }

    .form-container {
        padding: 20px 12px;
    }

    .form-title {
        font-size: 1.7rem;
    }
}

/* Loading animation */
@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.loading {
    animation: pulse 1.5s ease-in-out infinite;
}