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

/* Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #0B1010;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 1;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

.loading-screen.hidden {
    opacity: 0;
    visibility: hidden;
}

.spinner-container {
    position: relative;
    width: 120px;
    height: 120px;
}

.dao-character {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3rem;
    font-weight: 300;
    color: #F7FFFF;
    z-index: 2;
    font-family: 'Noto Sans SC', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
}

.spinner-dots {
    position: relative;
    width: 100%;
    height: 100%;
}

.dot {
    position: absolute;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #F7FFFF;
    animation: spinnerRotate 2s linear infinite;
}

.dot:nth-child(1) { 
    top: 50%; 
    left: 50%; 
    --rotation: 0deg;
    animation-delay: 0s;
}
.dot:nth-child(2) { 
    top: 50%; 
    left: 50%; 
    --rotation: 30deg;
    animation-delay: -0.167s;
}
.dot:nth-child(3) { 
    top: 50%; 
    left: 50%; 
    --rotation: 60deg;
    animation-delay: -0.333s;
}
.dot:nth-child(4) { 
    top: 50%; 
    left: 50%; 
    --rotation: 90deg;
    animation-delay: -0.5s;
}
.dot:nth-child(5) { 
    top: 50%; 
    left: 50%; 
    --rotation: 120deg;
    animation-delay: -0.667s;
}
.dot:nth-child(6) { 
    top: 50%; 
    left: 50%; 
    --rotation: 150deg;
    animation-delay: -0.833s;
}
.dot:nth-child(7) { 
    top: 50%; 
    left: 50%; 
    --rotation: 180deg;
    animation-delay: -1s;
}
.dot:nth-child(8) { 
    top: 50%; 
    left: 50%; 
    --rotation: 210deg;
    animation-delay: -1.167s;
}
.dot:nth-child(9) { 
    top: 50%; 
    left: 50%; 
    --rotation: 240deg;
    animation-delay: -1.333s;
}
.dot:nth-child(10) { 
    top: 50%; 
    left: 50%; 
    --rotation: 270deg;
    animation-delay: -1.5s;
}
.dot:nth-child(11) { 
    top: 50%; 
    left: 50%; 
    --rotation: 300deg;
    animation-delay: -1.667s;
}
.dot:nth-child(12) { 
    top: 50%; 
    left: 50%; 
    --rotation: 330deg;
    animation-delay: -1.833s;
}

@keyframes spinnerRotate {
    0% {
        opacity: 1;
        transform: translate(-50%, -50%) rotate(var(--rotation, 0deg)) translateY(-42px) scale(1);
    }
    50% {
        opacity: 0.3;
        transform: translate(-50%, -50%) rotate(var(--rotation, 0deg)) translateY(-42px) scale(0.8);
    }
    100% {
        opacity: 1;
        transform: translate(-50%, -50%) rotate(var(--rotation, 0deg)) translateY(-42px) scale(1);
    }
}

body {
    font-family: 'Inter', sans-serif;
    background: #0B1010;
    color: #F7FFFF;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

.container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
}

/* Анимация фона */
.background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    overflow: hidden;
}

.floating-shape {
    position: absolute;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(44, 202, 255, 0.1), rgba(44, 202, 255, 0.05));
    animation: float 20s infinite linear;
}

.shape-1 {
    width: 200px;
    height: 200px;
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.shape-2 {
    width: 150px;
    height: 150px;
    top: 20%;
    right: 15%;
    animation-delay: -5s;
}

.shape-3 {
    width: 100px;
    height: 100px;
    bottom: 20%;
    left: 20%;
    animation-delay: -10s;
}

.shape-4 {
    width: 250px;
    height: 250px;
    bottom: 10%;
    right: 10%;
    animation-delay: -15s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    25% {
        transform: translateY(-20px) rotate(90deg);
    }
    50% {
        transform: translateY(-40px) rotate(180deg);
    }
    75% {
        transform: translateY(-20px) rotate(270deg);
    }
}

/* Glass Card */
.glass-card {
    background: rgba(247, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(247, 255, 255, 0.1);
    border-radius: 24px;
    padding: 40px;
    width: 100%;
    max-width: 500px;
    position: relative;
    z-index: 10;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 24px;
    padding: 1px;
    background: linear-gradient(135deg, rgba(44, 202, 255, 0.3), rgba(247, 255, 255, 0.1));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    z-index: -1;
}

/* Header */
.card-header {
    text-align: center;
    margin-bottom: 40px;
}

.title {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #2CCAFF, #F7FFFF);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 12px;
    line-height: 1.2;
}

.subtitle {
    color: rgba(247, 255, 255, 0.7);
    font-size: 1.1rem;
    font-weight: 400;
    line-height: 1.5;
}

/* Form */
.registration-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.form-group {
    position: relative;
}

.form-label {
    display: block;
    font-weight: 500;
    font-size: 0.95rem;
    color: #F7FFFF;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 16px 20px;
    background: rgba(247, 255, 255, 0.03);
    border: 1px solid rgba(247, 255, 255, 0.1);
    border-radius: 12px;
    color: #F7FFFF;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: #2CCAFF;
    background: rgba(247, 255, 255, 0.05);
    box-shadow: 0 0 0 3px rgba(44, 202, 255, 0.1);
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: rgba(247, 255, 255, 0.4);
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
}

/* Input Glow Effect */
.input-glow {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #2CCAFF, transparent);
    border-radius: 1px;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.form-input:focus + .input-glow,
.form-select:focus + .input-glow,
.form-textarea:focus + .input-glow {
    opacity: 1;
}

/* Submit Button */
.submit-btn {
    position: relative;
    background: linear-gradient(135deg, #2CCAFF, #1ea5d9);
    border: none;
    border-radius: 12px;
    padding: 18px 32px;
    color: #0B1010;
    font-size: 1.1rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s ease;
    overflow: hidden;
    margin-top: 8px;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(44, 202, 255, 0.3);
}

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

.btn-glow {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s ease;
}

.submit-btn:hover .btn-glow {
    left: 100%;
}

.btn-text {
    position: relative;
    z-index: 2;
}

/* Form Footer */
.form-footer {
    margin-top: 32px;
    text-align: center;
}

.form-footer p {
    color: rgba(247, 255, 255, 0.5);
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Select Styling */
.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%23F7FFFF' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 16px;
    padding-right: 40px;
    cursor: pointer;
}

/* Responsive Design */
@media (max-width: 768px) {
    .glass-card {
        padding: 30px 24px;
        margin: 20px;
    }
    
    .title {
        font-size: 2rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .form-input,
    .form-select,
    .form-textarea {
        padding: 14px 16px;
    }
    
    .submit-btn {
        padding: 16px 28px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 10px;
    }
    
    .glass-card {
        padding: 24px 20px;
    }
    
    .title {
        font-size: 1.8rem;
    }
    
    .registration-form {
        gap: 20px;
    }
    
    .age-selector {
        gap: 6px;
    }
    
    .age-option label {
        padding: 10px 6px;
        min-height: 50px;
    }
    
    .age-number {
        font-size: 0.9rem;
    }
    
    .age-years {
        font-size: 0.7rem;
    }
    
    .income-ranges {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
    }
    
    .income-range {
        padding: 10px 6px;
        min-height: 50px;
    }
    
    .income-amount {
        font-size: 0.75rem;
    }
}

/* Loading State */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

.loading .submit-btn {
    background: linear-gradient(135deg, #2CCAFF, #1ea5d9);
}

.loading .btn-text::after {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(11, 16, 16, 0.3);
    border-top: 2px solid #0B1010;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 8px;
}

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

/* Age Selector */
.age-selector {
    display: flex;
    gap: 8px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.age-option {
    position: relative;
    flex: 1;
    min-width: 60px;
}

.age-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.age-option label {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 8px;
    background: rgba(247, 255, 255, 0.03);
    border: 1px solid rgba(247, 255, 255, 0.1);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    color: #F7FFFF;
    font-weight: 500;
    position: relative;
    min-height: 60px;
    justify-content: center;
}

.age-number {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1;
    margin-bottom: 2px;
}

.age-years {
    font-size: 0.75rem;
    opacity: 0.7;
    line-height: 1;
}

.age-option label:hover {
    background: rgba(247, 255, 255, 0.05);
    border-color: rgba(44, 202, 255, 0.2);
    transform: translateY(-1px);
}

.age-option input[type="radio"]:checked + label {
    background: rgba(44, 202, 255, 0.1);
    border-color: #2CCAFF;
    color: #2CCAFF;
    box-shadow: 0 0 0 2px rgba(44, 202, 255, 0.1);
}

/* Income Slider */
.income-slider-container {
    margin-top: 8px;
}

.income-slider {
    background: rgba(247, 255, 255, 0.03);
    border: 1px solid rgba(247, 255, 255, 0.1);
    border-radius: 16px;
    padding: 32px 24px;
    position: relative;
    overflow: visible;
}

.slider-track {
    width: 100%;
    height: 6px;
    background: rgba(247, 255, 255, 0.1);
    border-radius: 3px;
    position: relative;
    margin-bottom: 20px;
    overflow: visible;
}

.slider-fill {
    height: 100%;
    background: linear-gradient(90deg, #2CCAFF, #51cf66);
    border-radius: 3px;
    width: 0%;
    transition: width 0.3s ease;
}

.slider-thumb {
    position: absolute;
    top: 50%;
    transform: translateY(-50%) translateX(-50%);
    width: 20px;
    height: 20px;
    background: #2CCAFF;
    border: 3px solid #0B1010;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    left: 0%;
    z-index: 10;
}

.slider-thumb:hover {
    transform: translateY(-50%) translateX(-50%) scale(1.2);
    box-shadow: 0 4px 12px rgba(44, 202, 255, 0.4);
}

.slider-thumb:active {
    transform: translateY(-50%) translateX(-50%) scale(1.1);
    background: #1ea5d9;
}

.slider-labels {
    display: flex;
    justify-content: space-between;
    margin-bottom: 24px;
}

.slider-label {
    color: rgba(247, 255, 255, 0.6);
    font-size: 0.8rem;
    font-weight: 500;
}

.income-ranges {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.income-range {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 8px;
    background: rgba(247, 255, 255, 0.02);
    border: 1px solid rgba(247, 255, 255, 0.08);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    min-height: 60px;
    position: relative;
}

.income-range:hover {
    background: rgba(247, 255, 255, 0.05);
    border-color: rgba(44, 202, 255, 0.2);
    transform: translateY(-1px);
}

.income-range.selected {
    background: rgba(44, 202, 255, 0.1);
    border-color: #2CCAFF;
    box-shadow: 0 0 0 2px rgba(44, 202, 255, 0.1);
}

.income-amount {
    color: #F7FFFF;
    font-weight: 600;
    font-size: 0.85rem;
    line-height: 1.2;
}


/* Success/Error States */
.form-input.error,
.form-select.error,
.form-textarea.error,
.age-selector.error,
.income-slider-container.error {
    border-color: #ff6b6b;
    box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.1);
}

.form-input.success,
.form-select.success,
.form-textarea.success,
.age-selector.success,
.income-slider-container.success {
    border-color: #51cf66;
    box-shadow: 0 0 0 3px rgba(81, 207, 102, 0.1);
}
