:root {
    --bg-dark: #0f172a;
    --bg-gradient: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%);
    --surface: rgba(30, 41, 59, 0.7);
    --surface-light: rgba(51, 65, 85, 0.8);
    --border: rgba(255, 255, 255, 0.1);
    --text: #f8fafc;
    --text-muted: #94a3b8;
    --primary: #6366f1;
    --primary-hover: #818cf8;
    --secondary: #334155;
    --secondary-hover: #475569;
    --success: #10b981;
    --danger: #ef4444;
    --glass-blur: 16px;
}

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

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-dark);
    background-image: var(--bg-gradient);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.glass-bg {
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background:
        radial-gradient(ellipse at 15% 50%, rgba(99, 102, 241, 0.4), transparent 50%),
        radial-gradient(ellipse at 85% 30%, rgba(192, 132, 252, 0.4), transparent 50%),
        radial-gradient(ellipse at 50% 80%, rgba(16, 185, 129, 0.2), transparent 50%);
    filter: blur(40px);
    z-index: -1;
    animation: rotateMesh 30s ease-in-out infinite alternate;
}

@keyframes rotateMesh {
    0% { transform: scale(1) rotate(0deg); }
    100% { transform: scale(1.1) rotate(10deg); }
}

.wizard-container {
    width: 100%;
    max-width: 680px;
    background: var(--surface);
    backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    position: relative;
    transition: height 0.3s ease;
}

.wizard-slide {
    animation: slideScaleUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.hidden {
    display: none !important;
}

@keyframes slideScaleUp {
    from { opacity: 0; transform: translateY(20px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

h1, h2 {
    margin-bottom: 15px;
    font-weight: 600;
}

h1 { font-size: 2.5rem; text-align: center; }
h2 { font-size: 1.8rem; }
.subtitle { color: var(--text-muted); font-size: 1.1rem; text-align: center; margin-bottom: 30px; }
.gradient-text {
    background: linear-gradient(90deg, #818cf8, #c084fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.perks {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 30px;
}
.perk {
    background: var(--surface-light);
    padding: 15px 20px;
    border-radius: 12px;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    border: 1px solid var(--border);
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    outline: none;
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.2s;
    padding: 12px 24px;
    font-size: 1rem;
}

.btn-lg {
    width: 100%;
    padding: 16px;
    font-size: 1.2rem;
}

.primary-btn {
    background: var(--primary);
    color: #fff;
}
.primary-btn:hover:not(:disabled) { background: var(--primary-hover); transform: translateY(-2px); }

.secondary-btn {
    background: var(--secondary);
    color: var(--text);
}
.secondary-btn:hover { background: var(--secondary-hover); }

.success-btn { background: var(--success); color: #fff; }
.success-btn:hover { filter: brightness(1.1); transform: translateY(-2px); }

.yookassa-btn {
    width: 100%;
    padding: 16px;
    font-size: 1.2rem;
    background: #000;
    color: #fff;
    border: 1px solid #4ade80;
    margin-top: 10px;
}
.yookassa-btn:hover { background: #111; border-color: #22c55e; }

.btn-glow { box-shadow: 0 0 20px rgba(99, 102, 241, 0.5); }
.pulse { animation: pulse 2s infinite; }
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

button:disabled { opacity: 0.6; cursor: not-allowed; }

.grid-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
}

.card-radio input { display: none; }
.card-content {
    background: var(--surface-light);
    border: 2px solid var(--border);
    border-radius: 16px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.2s;
    height: 100%;
}
.card-radio input:checked + .card-content {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.1);
}
.card-content:hover { border-color: var(--primary-hover); transform: translateY(-2px); }
.card-content .icon { font-size: 2rem; margin-bottom: 10px; }
.card-content h3 { font-size: 1.1rem; margin-bottom: 5px; }
.card-content p { font-size: 0.85rem; color: var(--text-muted); }

.nav-buttons {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin-top: 25px;
}
.nav-buttons .primary-btn, .nav-buttons .success-btn { flex: 1; }

.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 8px; font-weight: 500; font-size: 0.95rem; }
input[type="text"], input[type="email"], input[type="number"], textarea, select {
    width: 100%;
    padding: 14px;
    background: var(--bg-dark);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text);
    font-family: inherit;
    font-size: 1rem;
    transition: border 0.3s;
}
input:focus, textarea:focus { border-color: var(--primary); outline: none; }

.big-input-group input {
    font-size: 1.3rem;
    padding: 20px;
}

.scroll-container {
    max-height: 50vh;
    overflow-y: auto;
    padding-right: 10px;
}
.scroll-container::-webkit-scrollbar { width: 6px; }
.scroll-container::-webkit-scrollbar-thumb { background: var(--secondary); border-radius: 3px; }

input[type="range"] {
    width: 100%;
    accent-color: var(--primary);
}

.file-drop-area {
    border: 2px dashed var(--border);
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    background: rgba(0,0,0,0.2);
}
.file-drop-area:hover { border-color: var(--primary); background: rgba(99, 102, 241, 0.05); }
.file-drop-area input { display: none; }

.accordion { cursor: pointer; color: var(--primary-hover); border-bottom: 1px dashed var(--border); padding-bottom: 10px;}
.accordion-content { display: none; margin-top: 15px; }

.terminal {
    background: #000;
    border-radius: 12px;
    padding: 15px;
    font-family: monospace;
    font-size: 0.9rem;
    color: #4ade80;
    height: 200px;
    overflow-y: auto;
    border: 1px solid var(--secondary);
}
.log-line { margin-bottom: 5px; opacity: 0.9; }

.spinner {
    width: 40px; height: 40px;
    border: 4px solid var(--secondary);
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

.mt-top { margin-top: 25px; }

.bib-container {
    max-height: 250px;
    overflow-y: auto;
    background: var(--bg-dark);
    padding: 15px;
    border-radius: 12px;
    border: 1px solid var(--border);
    font-size: 0.9rem;
}
.bib-item { margin-bottom: 10px; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.bib-item a { color: var(--primary-hover); word-break: break-all; }

.invoice-card {
    background: var(--bg-dark);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 25px;
    margin-top: 20px;
}
.invoice-item, .invoice-total { display: flex; justify-content: space-between; font-size: 1.1rem; }
.invoice-total { font-weight: 700; font-size: 1.3rem; color: #fff; }

@media (max-width: 600px) {
    .wizard-container { padding: 25px 20px; border-radius: 16px; }
    h1 { font-size: 2rem; }
    h2 { font-size: 1.5rem; }
    .grid-cards { grid-template-columns: 1fr; }
}
