* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #dc2626;
    --primary-dark: #991b1b;
    --primary-light: #fef2f2;
    --primary-gradient: linear-gradient(135deg, #dc2626, #7f1d1d);
    --accent: #ef4444;
    --dark: #1a1a1a;
    --gray: #6b7280;
    --border: #e5e7eb;
    --radius: 12px;
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s ease;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.5;
    color: var(--dark);
    min-height: 100vh;
    padding: 20px;
    background: linear-gradient(to bottom right, #00ccff 0%, #0066ff 100%);
    position: relative;
    overflow-x: hidden;
}

/* Плавающие элементы фона */
.floating-shapes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.08;
    animation: floatUp 20s infinite ease-in-out;
}

.shape:nth-child(1) {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, #fca5a5, transparent);
    left: -100px;
    top: 20%;
    animation-delay: 0s;
    animation-duration: 22s;
}

.shape:nth-child(2) {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, #f87171, transparent);
    right: -150px;
    top: 50%;
    animation-delay: -5s;
    animation-duration: 25s;
}

.shape:nth-child(3) {
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, #fca5a5, transparent);
    left: 30%;
    bottom: -100px;
    animation-delay: -10s;
    animation-duration: 18s;
}

.shape:nth-child(4) {
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, #f87171, transparent);
    right: 20%;
    top: 10%;
    animation-delay: -7s;
    animation-duration: 20s;
}

.shape:nth-child(5) {
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, #fca5a5, transparent);
    left: 10%;
    top: 60%;
    animation-delay: -3s;
    animation-duration: 16s;
}

.shape:nth-child(6) {
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, #f87171, transparent);
    right: -100px;
    bottom: 10%;
    animation-delay: -12s;
    animation-duration: 28s;
}

@keyframes floatUp {
    0% {
        transform: translate(0, 0) scale(1) rotate(0deg);
    }
    25% {
        transform: translate(30px, -50px) scale(1.1) rotate(5deg);
    }
    50% {
        transform: translate(-20px, -100px) scale(0.9) rotate(-5deg);
    }
    75% {
        transform: translate(40px, -70px) scale(1.05) rotate(3deg);
    }
    100% {
        transform: translate(0, 0) scale(1) rotate(0deg);
    }
}

/* Мелкие частицы */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 6px;
    height: 6px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    animation: particleFloat 15s infinite ease-in-out;
}

.particle:nth-child(1) { left: 10%; top: 20%; animation-delay: 0s; }
.particle:nth-child(2) { left: 25%; top: 70%; animation-delay: -3s; width: 8px; height: 8px; }
.particle:nth-child(3) { left: 50%; top: 30%; animation-delay: -6s; }
.particle:nth-child(4) { left: 70%; top: 80%; animation-delay: -2s; width: 4px; height: 4px; }
.particle:nth-child(5) { left: 85%; top: 15%; animation-delay: -8s; width: 10px; height: 10px; }
.particle:nth-child(6) { left: 40%; top: 90%; animation-delay: -4s; }
.particle:nth-child(7) { left: 15%; top: 45%; animation-delay: -10s; width: 5px; height: 5px; }
.particle:nth-child(8) { left: 65%; top: 50%; animation-delay: -7s; }
.particle:nth-child(9) { left: 90%; top: 60%; animation-delay: -5s; width: 7px; height: 7px; }
.particle:nth-child(10) { left: 5%; top: 85%; animation-delay: -9s; }

@keyframes particleFloat {
    0%, 100% {
        transform: translate(0, 0) scale(1);
        opacity: 0.15;
    }
    25% {
        transform: translate(20px, -30px) scale(1.5);
        opacity: 0.3;
    }
    50% {
        transform: translate(-15px, -60px) scale(0.8);
        opacity: 0.1;
    }
    75% {
        transform: translate(25px, -40px) scale(1.3);
        opacity: 0.25;
    }
}

.container {
    max-width: 720px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* Header */
header {
    text-align: center;
    margin-bottom: 24px;
    padding: 20px 0 10px;
}

.header-icon {
    width: 64px;
    height: 64px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.8rem;
    margin: 0 auto 14px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    transition: var(--transition);
}

.header-icon:hover {
    transform: scale(1.05) rotate(-5deg);
    background: rgba(255, 255, 255, 0.25);
}

h1 {
    font-size: 1.6rem;
    font-weight: 700;
    color: white;
    letter-spacing: -0.5px;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.2);
}

.subtitle {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.8);
    margin-top: 6px;
    text-shadow: 0 1px 10px rgba(0, 0, 0, 0.1);
}

/* Form */
.form-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: var(--radius);
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.2);
    padding: 28px 32px;
    margin-bottom: 24px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: var(--transition);
}

.form-container:hover {
    box-shadow: 0 12px 50px rgba(0, 0, 0, 0.25);
}

@media (max-width: 480px) {
    body {
        padding: 12px;
    }
    .form-container {
        padding: 18px 16px;
    }
    h1 {
        font-size: 1.3rem;
    }
    .header-icon {
        width: 52px;
        height: 52px;
        font-size: 1.4rem;
    }
}

/* Grid */
.compact-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 14px;
}

.salary-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

@media (max-width: 480px) {
    .compact-row {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .salary-row {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}

/* Form Groups */
.form-group {
    margin-bottom: 14px;
}

label {
    display: block;
    margin-bottom: 4px;
    font-weight: 500;
    font-size: 0.85rem;
    color: var(--dark);
}

.label-hint {
    font-size: 0.75rem;
    color: var(--gray);
    font-weight: 400;
    display: block;
    margin-top: 2px;
}

.required::after {
    content: " *";
    color: var(--primary);
    font-weight: 700;
}

/* Inputs */
input[type="text"],
input[type="number"],
input[type="email"],
input[type="date"],
textarea,
select {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 0.85rem;
    font-family: inherit;
    transition: var(--transition);
    background: white;
    color: var(--dark);
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.08);
}

textarea {
    min-height: 56px;
    resize: vertical;
    line-height: 1.4;
}

.compact-textarea {
    min-height: 50px;
}

/* Sections */
.section {
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f3f4f6;
}

.section:last-child {
    border-bottom: none;
    margin-bottom: 16px;
    padding-bottom: 0;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    padding: 10px 14px;
    background: var(--primary-light);
    border-radius: 8px;
    border-left: 3px solid var(--primary);
}

.section-number {
    width: 26px;
    height: 26px;
    background: var(--primary-gradient);
    color: white;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    flex-shrink: 0;
}

.section-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--primary-dark);
}

.section-subtitle {
    font-size: 0.78rem;
    color: var(--gray);
}

/* Info Box */
.info-box {
    background: var(--primary-light);
    border: 1px solid #fca5a5;
    border-radius: 8px;
    padding: 12px 16px;
    margin: 16px 0;
    font-size: 0.82rem;
    color: var(--primary-dark);
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.info-box i {
    color: var(--primary);
    font-size: 1rem;
    margin-top: 1px;
}

/* Button */
.btn-submit {
    width: 100%;
    padding: 14px;
    background: var(--primary-gradient);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
    letter-spacing: 0.2px;
    position: relative;
    overflow: hidden;
}

.btn-submit::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.5s ease;
}

.btn-submit:hover::before {
    left: 100%;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(220, 38, 38, 0.4);
}

.btn-submit:active {
    transform: translateY(0);
}

.btn-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none !important;
}

/* Messages */
.message {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    display: none;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
    font-weight: 500;
    backdrop-filter: blur(10px);
}

.message i {
    font-size: 1.1rem;
}

.success {
    background: rgba(34, 197, 94, 0.15);
    backdrop-filter: blur(10px);
    color: #166534;
    border: 1px solid rgba(34, 197, 94, 0.3);
    display: flex;
}

.error {
    background: rgba(220, 38, 38, 0.12);
    backdrop-filter: blur(10px);
    color: #991b1b;
    border: 1px solid rgba(220, 38, 38, 0.3);
    display: flex;
}

.fa-spinner {
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Footer */
footer {
    text-align: center;
    padding: 16px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.78rem;
    text-shadow: 0 1px 10px rgba(0, 0, 0, 0.1);
}

footer a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: var(--transition);
}

footer a:hover {
    color: white;
}

/* Error state */
input.error,
textarea.error,
select.error {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.1) !important;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}