:root {
    --primary: #00e5ff;
    --primary-glow: rgba(0, 229, 255, 0.4);
    --bg-dark: #08080c;
    --card-bg: rgba(255, 255, 255, 0.03);
    --card-border: rgba(255, 255, 255, 0.1);
    --text: #ffffff;
    --text-dim: rgba(255, 255, 255, 0.5);
    --transition: cubic-bezier(0.16, 1, 0.3, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--bg-dark);
    color: var(--text);
    overflow: hidden;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Background System */
.bg-v2 {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('bg_v2.png') center/cover no-repeat;
    z-index: -2;
}

.bg-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, transparent 0%, rgba(0,0,0,0.4) 100%),
                linear-gradient(180deg, rgba(8,8,12,0.4) 0%, rgba(8,8,12,0.7) 100%);
    z-index: -1;
}

/* Header */
header {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 0.8rem 4rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    background: var(--card-bg);
    backdrop-filter: blur(20px) saturate(120%);
    -webkit-backdrop-filter: blur(20px) saturate(120%);
    border-bottom: 1px solid var(--card-border);
}

@media (max-width: 768px) {
    header { padding: 0.6rem 1.25rem; }
}

.header-tg-btn {
    background: rgba(0, 210, 255, 0.1);
    border: 1px solid rgba(0, 210, 255, 0.3);
    color: #00d2ff;
    padding: 0.6rem 1.2rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 800;
    transition: all 0.3s;
    letter-spacing: 1px;
}

.header-tg-btn svg {
    width: 18px;
    height: 18px;
}

.header-tg-btn:hover {
    background: #00d2ff;
    color: #000;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 210, 255, 0.2);
}

@media (max-width: 768px) {
    .header-tg-btn span { display: none; }
    .header-tg-btn { padding: 0.5rem; }
}

.logo-group {
    display: flex;
    flex-direction: column;
}

.logo-group {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.logo {
    font-family: 'Inter', sans-serif;
    font-size: 2.2rem;
    font-weight: 900;
    letter-spacing: -1px;
    line-height: 1;
    display: flex;
    align-items: center;
}

.logo-sub {
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    letter-spacing: 2px;
    font-weight: 700;
    color: #00d2ff;
    text-transform: uppercase;
    margin-top: 4px;
}

@media (max-width: 768px) {
    .logo {
        font-size: 1.6rem;
    }
    .logo-sub {
        font-size: 0.55rem;
        letter-spacing: 1px;
    }
}

/* Main Container */
.main-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 0 1rem 4rem 1rem;
}

.quiz-container {
    width: 100%;
    max-width: 1000px;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.quiz-header {
    margin-bottom: 1rem;
    min-height: 5px;
}

.progress-container {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 2rem;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--primary-glow));
    width: 0%;
    transition: width 0.6s var(--transition);
    box-shadow: 0 0 10px var(--primary-glow);
}

/* Quiz Card Redesign - MORE TRANSPARENT */
.quiz-card {
    background: var(--card-bg);
    backdrop-filter: blur(25px) saturate(120%);
    -webkit-backdrop-filter: blur(25px) saturate(120%);
    border: 1px solid var(--card-border);
    border-radius: 40px;
    padding: 3rem 4rem 4rem 4rem;
    position: relative;
    box-shadow: 0 50px 100px rgba(0,0,0,0.5);
    margin-bottom: 2rem;
}

.quiz-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 10%;
    width: 80%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    opacity: 0.5;
}

/* Step Typography */
.step {
    display: none;
    opacity: 0;
    transform: translateX(30px);
    transition: all 0.6s var(--transition);
}

.step.active {
    display: block;
    opacity: 1;
    transform: translateX(0);
}

.question {
    font-size: 2.8rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 3rem;
    letter-spacing: -1px;
}

/* Options Grid Improvements */
.options-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.2rem;
}

.option-btn {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--card-border);
    padding: 2.2rem;
    border-radius: 25px;
    color: var(--text);
    text-align: left;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.4s var(--transition);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.option-btn span {
    opacity: 0.1;
    font-size: 1.5rem;
    transition: 0.3s;
}

.option-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--primary);
    transform: scale(1.02);
    box-shadow: 0 15px 30px rgba(0,0,0,0.3);
}

.option-btn:hover span {
    opacity: 1;
    color: var(--primary);
    transform: translateX(5px);
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--card-border);
    color: var(--text-dim);
    padding: 0.5rem 1rem;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    cursor: pointer;
    margin-bottom: 1.5rem;
    transition: 0.3s;
}

.back-btn:hover {
    color: #fff;
    transform: translateX(-5px);
}

/* Inputs */
input[type="text"], input[type="tel"] {
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--card-border);
    padding: 1.8rem 2rem;
    border-radius: 20px;
    color: white;
    font-size: 1.25rem;
    font-weight: 500;
    margin-bottom: 2rem;
    transition: all 0.4s var(--transition);
    outline: none;
    display: block;
}

input::placeholder {
    color: rgba(255, 255, 255, 0.2);
}

input:focus {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--primary);
    box-shadow: 0 0 30px rgba(0, 229, 255, 0.1);
}

/* Controls */
.btn-primary {
    background: #fff;
    color: #000;
    border: none;
    padding: 1.8rem 4rem;
    border-radius: 20px;
    font-size: 1.1rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all 0.4s;
    box-shadow: 0 20px 40px rgba(255,255,255,0.1);
}

.btn-primary:hover {
    background: var(--primary);
    transform: translateY(-5px);
    box-shadow: 0 25px 50px var(--primary-glow);
}

/* Mobile Perfection */
@media (max-width: 768px) {
    header { padding: 1.5rem; }
    .logo { font-size: 1.4rem; }
    
    .main-wrapper { 
        padding: 1rem; 
        align-items: center; /* Центрируем по вертикали или смещаем выше */
    }
    
    .quiz-card {
        border-radius: 30px;
        padding: 2.5rem 1.5rem;
        max-height: 90vh;
        margin-bottom: 0;
        width: 100%;
    }

    .question { font-size: 1.8rem; margin-bottom: 2rem; }
    .options-grid { grid-template-columns: 1fr; gap: 0.8rem; }
    .option-btn { padding: 1.5rem; font-size: 1.1rem; border-radius: 20px; }
    
    .back-btn { margin-bottom: 1.2rem; }
    .btn-primary { width: 100%; padding: 1.5rem; }
}

/* Animations */
.fade-in { animation: fadeIn 1s ease forwards; }
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.grain {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: url('https://grainy-gradients.vercel.app/noise.svg');
    opacity: 0.05;
    pointer-events: none;
    z-index: 5;
}
