:root {
    /* Токена из макетов */
    --bg-color: #F8F6F2;
    --bg-gradient: linear-gradient(to bottom, #F8F6F2 0%, #FDFCFB 100%);
    --card-bg: #F4F0E8;
    --card-bg-light: #FFFFFF;
    --text-main: #4A3F35;
    --text-muted: #8C7B68;
    --accent-gold: #CBA577;
    --accent-gold-hover: #B8905E;
    --accent-light: #EBE5DB;
    --border-color: #DCCCB8;
    --white: #FFFFFF;

    --border-radius: 12px;
}

:root[data-theme="dark"] {
    --bg-color: #191a1e;
    --bg-gradient: linear-gradient(to bottom, #191a1e 0%, #1f2126 100%);
    --card-bg: #262a30;
    --card-bg-light: #2e333b;
    --text-main: #f3ece2;
    --text-muted: #b6aa9a;
    --accent-gold: #d6b389;
    --accent-gold-hover: #e2c39d;
    --accent-light: #383f49;
    --border-color: #4a4f58;
    --white: #ffffff;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: 'Montserrat', sans-serif;
    line-height: 1.5;
    padding: 20px;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
    background-image: var(--bg-gradient);
    transition: background-color 0.25s ease, color 0.25s ease, background-image 0.25s ease;
}

#app {
    max-width: 600px;
    margin: 0 auto;
}

.screen {
    display: none;
    animation: fadeIn 0.4s ease;
    position: relative;
    z-index: 1;
}

.screen.active {
    display: flex;
    flex-direction: column;
    min-height: 90vh;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

h1 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 36px;
    margin-bottom: 20px;
    font-weight: 600;
    letter-spacing: -0.5px;
    color: var(--text-main);
    text-align: center;
}

h2 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 28px;
    margin-bottom: 25px;
    color: var(--text-main);
    font-weight: 600;
}

p {
    font-size: 14px;
    margin-bottom: 15px;
    color: var(--text-main);
}

/* Карточки контента */
.content-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 30px 24px;
    border-radius: var(--border-radius);
    margin-bottom: 30px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
}

.content-card p {
    text-align: left;
}

/* Иконки списка */
.list-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: var(--accent-light);
    border-radius: 50%;
    margin-right: 12px;
    flex-shrink: 0;
    transition: all 0.4s ease;
}

.list-icon svg {
    width: 12px;
    height: 12px;
    stroke: var(--accent-gold);
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
    transition: stroke 0.3s ease;
}

@keyframes list-icon-spin-once {
    from {
        transform: rotateY(0deg);
    }

    to {
        transform: rotateY(360deg);
    }
}

.list-icon.is-active {
    background: var(--accent-gold);
    transform: scale(1.1);
}

.list-icon.is-active svg {
    stroke: var(--white);
    animation: list-icon-spin-once 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.intro-list {
    list-style: none;
    padding-left: 0;
    margin-bottom: 25px;
    color: var(--text-main);
    font-size: 14px;
}

.intro-list li {
    display: flex;
    align-items: flex-start;
    margin-bottom: 12px;
    text-align: left;
}

.hint-text {
    color: var(--text-muted);
    font-size: 13px;
    margin-bottom: 0;
    text-align: center !important;
}

/* Стили квиза */
.progress-bar {
    width: 100%;
    height: 4px;
    background-color: var(--border-color);
    border-radius: 2px;
    margin-bottom: 20px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--accent-gold);
    width: 0%;
    transition: width 0.4s ease;
}

.block-counter {
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 5px;
    text-align: left;
}

.question-block {
    margin-bottom: 30px;
}

.quiz-nav {
    display: flex;
    gap: 15px;
    margin-top: auto;
}

.quiz-nav .btn {
    margin-top: 0;
}

#prevBtn {
    flex: 0.4;
}

#nextBtn {
    flex: 1;
}

.option-label {
    display: flex;
    align-items: flex-start;
    background: var(--card-bg-light);
    padding: 18px 20px;
    margin-bottom: 12px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.option-label:hover {
    border-color: var(--accent-gold);
}

@keyframes select-pop {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(0.98);
    }

    100% {
        transform: scale(1);
    }
}

.option-label.selected {
    border-color: var(--accent-gold);
    background: #FAF7F2;
    animation: select-pop 0.25s ease-out;
}

:root[data-theme="dark"] .option-label.selected {
    background: #3a4049;
    border-color: var(--accent-gold);
}

.checkbox-custom {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    margin-right: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s;
    background: var(--white);
}

@keyframes check-pop {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.15);
    }

    100% {
        transform: scale(1);
    }
}

.option-label.selected .checkbox-custom {
    background: var(--accent-gold);
    border-color: var(--accent-gold);
    animation: check-pop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.checkbox-custom svg {
    width: 12px;
    height: 12px;
    fill: none;
    stroke: var(--white);
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
    opacity: 0;
}

.option-label.selected .checkbox-custom svg {
    opacity: 1;
}

input[type="checkbox"] {
    display: none;
}

.option-text {
    font-size: 14px;
    line-height: 1.4;
    color: var(--text-main);
}

/* Кнопки */
.btn {
    background: var(--accent-gold);
    color: var(--white);
    border: none;
    padding: 18px;
    border-radius: 8px;
    font-size: 14px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
    width: 100%;
    cursor: pointer;
    margin-top: auto;
    transition: all 0.2s;
}

@keyframes btn-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(203, 165, 119, 0.7);
    }

    70% {
        box-shadow: 0 0 0 15px rgba(203, 165, 119, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(203, 165, 119, 0);
    }
}

.btn-pulse {
    animation: btn-pulse 2s infinite cubic-bezier(0.66, 0, 0, 1);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn:active {
    transform: scale(0.98);
}

.btn-outline {
    background: transparent;
    color: var(--accent-gold);
    border: 1px solid var(--accent-gold);
}

.btn-outline:active {
    background: var(--accent-light);
}

.mt-btn {
    margin-top: 15px !important;
}

/* Результат */
.result-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 32px;
    font-weight: 600;
    color: var(--accent-gold);
    margin-bottom: 20px;
    line-height: 1.2;
}

@keyframes big-star-glow {
    0% {
        filter: drop-shadow(0 0 5px rgba(203, 165, 119, 0.2));
        transform: scale(1);
    }

    50% {
        filter: drop-shadow(0 0 20px rgba(203, 165, 119, 0.6));
        transform: scale(1.05);
    }

    100% {
        filter: drop-shadow(0 0 5px rgba(203, 165, 119, 0.2));
        transform: scale(1);
    }
}

@keyframes big-star-rotate {
    0% {
        transform: rotateY(0deg);
    }

    100% {
        transform: rotateY(360deg);
    }
}

.emoji-big {
    font-size: 54px;
    margin-bottom: 25px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
}

.emoji-big svg {
    animation: big-star-glow 3s infinite ease-in-out, big-star-rotate 8s infinite linear;
    transition: transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.emoji-big:hover svg {
    animation: big-star-glow 3s infinite ease-in-out, big-star-rotate 8s infinite linear;
}

.result-subtitle {
    font-size: 12px;
    color: var(--text-muted);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 10px;
    text-align: center;
}

/* Мелкие декоративные элементы */
.badge {
    display: inline-block;
    color: var(--accent-gold);
    padding: 0;
    font-size: 11px;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 20px;
}

.theme-toggle {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 1200;
    border: 1px solid var(--border-color);
    background: var(--card-bg-light);
    color: var(--text-main);
    border-radius: 999px;
    min-width: 44px;
    height: 44px;
    padding: 0 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.4px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.2s ease, background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.theme-toggle:hover {
    transform: translateY(-1px);
}

.theme-toggle:active {
    transform: scale(0.98);
}

.theme-toggle .theme-icon {
    font-size: 14px;
    line-height: 1;
    width: 16px;
    height: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.theme-toggle .theme-icon svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    stroke-width: 1.8;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.theme-toggle--inline {
    position: static;
    right: auto;
    bottom: auto;
    margin: 0 auto 12px;
}

.header-controls {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.theme-toggle--header {
    position: static;
    right: auto;
    bottom: auto;
    min-width: 34px;
    width: 34px;
    height: 34px;
    padding: 0;
    border-radius: 8px;
    box-shadow: none;
    background: transparent;
    z-index: 2;
}

.theme-toggle--header:hover {
    transform: none;
    background: var(--accent-light);
}

.theme-toggle--header .theme-text {
    display: none;
}

.theme-toggle--header .theme-icon {
    font-size: 16px;
}

/* Мобильная адаптация файлов */
@media (max-width: 600px) {
    body {
        padding: 15px 10px;
    }

    .content-card {
        padding: 24px 16px;
    }

    h1 {
        font-size: 28px;
    }

    h2 {
        font-size: 24px;
        margin-bottom: 20px;
    }

    p {
        font-size: 13px;
    }

    .btn {
        padding: 16px;
        font-size: 13px;
    }

    .option-label {
        padding: 15px 16px;
    }

    .result-title {
        font-size: 26px;
    }

    .emoji-big {
        font-size: 46px;
    }

    .theme-toggle {
        right: 12px;
        bottom: 12px;
        min-width: 40px;
        height: 40px;
        padding: 0 12px;
    }

    .theme-toggle--header {
        right: auto;
        bottom: auto;
        min-width: 34px;
        height: 34px;
        padding: 0;
    }
}
