/* Telegram Mini App — Шарунас Коучинг ДФС */
/* Theme-aware: uses Telegram CSS variables */

:root {
    --tg-theme-bg-color: #ffffff;
    --tg-theme-text-color: #1a1a2e;
    --tg-theme-hint-color: #8e8e93;
    --tg-theme-link-color: #2481cc;
    --tg-theme-button-color: #2481cc;
    --tg-theme-button-text-color: #ffffff;
    --tg-theme-secondary-bg-color: #f2f2f7;

    --accent: #5B4FCF;
    --accent-dark: #4A3FB8;
    --accent-light: rgba(91, 79, 207, 0.08);
    --success: #34C759;
    --warm: #E8DDD3;
    --radius: 16px;
    --radius-sm: 12px;
    --shadow: 0 4px 20px rgba(0,0,0,0.06);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.10);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--tg-theme-bg-color);
    color: var(--tg-theme-text-color);
    line-height: 1.55;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Screens */
.screen {
    display: none;
    padding: 20px 16px 100px;
    max-width: 480px;
    margin: 0 auto;
    animation: fadeIn 0.3s ease;
}

.screen.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Hero */
.hero {
    text-align: center;
    padding: 32px 0 24px;
}

.hero-badge {
    display: inline-block;
    background: var(--accent-light);
    color: var(--accent);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 16px;
}

.hero h1 {
    font-size: 26px;
    font-weight: 800;
    line-height: 1.25;
    margin-bottom: 14px;
    letter-spacing: -0.3px;
}

.hero-subtitle {
    font-size: 15px;
    color: var(--tg-theme-hint-color);
    max-width: 320px;
    margin: 0 auto;
    line-height: 1.5;
}

/* Benefits */
.benefits {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 24px 0;
}

.benefit-card {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    background: var(--tg-theme-secondary-bg-color);
    padding: 16px;
    border-radius: var(--radius-sm);
}

.benefit-icon {
    font-size: 28px;
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--tg-theme-bg-color);
    border-radius: 12px;
}

.benefit-card h3 {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 3px;
}

.benefit-card p {
    font-size: 13px;
    color: var(--tg-theme-hint-color);
    line-height: 1.4;
}

/* Social Proof */
.social-proof {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px 16px;
    background: var(--warm);
    border-radius: var(--radius-sm);
    margin-bottom: 28px;
}

.social-proof p {
    font-size: 14px;
    text-align: center;
}

/* Buttons */
.btn-primary {
    width: 100%;
    padding: 16px 24px;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    -webkit-tap-highlight-color: transparent;
}

.btn-primary:active {
    transform: scale(0.97);
    background: var(--accent-dark);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: default;
}

.btn-secondary {
    padding: 14px 20px;
    background: var(--tg-theme-secondary-bg-color);
    color: var(--tg-theme-text-color);
    border: none;
    border-radius: var(--radius);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    -webkit-tap-highlight-color: transparent;
    width: 100%;
}

.btn-hint {
    text-align: center;
    font-size: 13px;
    color: var(--tg-theme-hint-color);
    margin-top: 10px;
}

/* Progress Bar */
.progress-bar {
    height: 4px;
    background: var(--tg-theme-secondary-bg-color);
    border-radius: 2px;
    margin-bottom: 8px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--accent);
    border-radius: 2px;
    transition: width 0.4s ease;
    width: 20%;
}

.quiz-step-counter {
    text-align: center;
    font-size: 13px;
    color: var(--tg-theme-hint-color);
    margin-bottom: 24px;
}

/* Quiz */
#quiz-container {
    min-height: 300px;
}

.quiz-question {
    animation: fadeIn 0.3s ease;
}

.quiz-question h2 {
    font-size: 21px;
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1.3;
}

.quiz-question .quiz-desc {
    font-size: 14px;
    color: var(--tg-theme-hint-color);
    margin-bottom: 20px;
    line-height: 1.5;
}

.quiz-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.quiz-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: var(--tg-theme-secondary-bg-color);
    border: 2px solid transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s;
    -webkit-tap-highlight-color: transparent;
}

.quiz-option:active {
    transform: scale(0.98);
}

.quiz-option.selected {
    border-color: var(--accent);
    background: var(--accent-light);
}

.quiz-option-icon {
    font-size: 22px;
    flex-shrink: 0;
}

.quiz-option-text {
    font-size: 15px;
    font-weight: 600;
}

.quiz-nav {
    display: flex;
    gap: 10px;
    margin-top: 28px;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 16px;
    background: var(--tg-theme-bg-color);
    border-top: 1px solid var(--tg-theme-secondary-bg-color);
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
}

.quiz-nav .btn-primary {
    flex: 1;
}

.quiz-nav .btn-secondary {
    flex: 0 0 auto;
    width: auto;
    padding: 14px 18px;
}

/* Result */
.result-header {
    text-align: center;
    padding: 32px 0 20px;
}

.result-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.result-header h2 {
    font-size: 22px;
    font-weight: 800;
    line-height: 1.3;
}

.result-card {
    background: var(--tg-theme-secondary-bg-color);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 20px;
}

.result-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 10px 0;
    border-bottom: 1px solid rgba(0,0,0,0.06);
    gap: 12px;
}

.result-item:last-child {
    border-bottom: none;
}

.result-label {
    font-size: 14px;
    color: var(--tg-theme-hint-color);
    flex-shrink: 0;
}

.result-value {
    font-size: 14px;
    font-weight: 700;
    text-align: right;
}

/* Offer */
.offer-card {
    background: linear-gradient(135deg, #1a1a2e 0%, #2d1b69 100%);
    color: #fff;
    border-radius: var(--radius);
    padding: 24px 20px;
    text-align: center;
    box-shadow: var(--shadow-lg);
    margin-bottom: 16px;
}

.offer-badge {
    display: inline-block;
    background: var(--accent);
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 14px;
}

.offer-card h3 {
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 8px;
}

.offer-desc {
    font-size: 14px;
    opacity: 0.7;
    margin-bottom: 20px;
}

.offer-features {
    list-style: none;
    text-align: left;
    margin-bottom: 24px;
}

.offer-features li {
    padding: 6px 0;
    font-size: 14px;
    opacity: 0.9;
}

.offer-card .btn-primary {
    background: #fff;
    color: var(--accent);
}

.offer-card .btn-primary:active {
    background: #f0f0f0;
}

.offer-card .btn-hint {
    color: rgba(255,255,255,0.5);
}

.btn-cta {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.3); }
    50% { box-shadow: 0 0 0 12px rgba(255, 255, 255, 0); }
}

/* Individual block */
.individual-block {
    background: var(--tg-theme-secondary-bg-color);
    border-radius: var(--radius);
    padding: 20px;
    text-align: center;
    margin-top: 16px;
}

.individual-block h3 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 8px;
}

.individual-block p {
    font-size: 14px;
    color: var(--tg-theme-hint-color);
    margin-bottom: 16px;
    line-height: 1.5;
}
