/* ===== BASE ===== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --bg-primary: #070312;
    --bg-secondary: #13132a;
    --bg-card: #1a1a2e;
    --bg-card-hover: #1e1e35;
    --purple: #a855f7;
    --purple-light: #c4b5fd;
    --purple-dark: #7c3aed;
    --purple-btn: #9333ea;
    --text-primary: #ffffff;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;
    --border: #2a2a4a;
    --border-card: #2d2d50;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    text-decoration: none;
    color: inherit;
}

/* ===== NAVBAR ===== */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(7, 3, 18, 0.92);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(124, 58, 237, 0.12);
    padding: 0 24px;
}

.navbar__container {
    max-width: 1200px;
    margin: 0 auto;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.navbar__logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

.navbar__logo-icon svg {
    display: block;
}

.navbar__links {
    display: flex;
    align-items: center;
    gap: 32px;
}

.navbar__link {
    color: var(--purple-light);
    font-size: 15px;
    font-weight: 500;
    transition: color 0.2s;
}

.navbar__link:hover {
    color: var(--purple);
}

.navbar__btn {
    background: var(--purple-btn);
    color: white;
    padding: 10px 20px;
    border-radius: 50px;
    font-size: 15px;
    font-weight: 600;
    transition: background 0.2s, transform 0.1s;
}

.navbar__btn:hover {
    background: var(--purple-dark);
    transform: translateY(-1px);
}

/* ===== BURGER MENU ===== */
.navbar__burger {
    display: none;
    width: 44px;
    height: 44px;
    background: transparent;
    border: 1px solid rgba(168, 85, 247, 0.2);
    border-radius: 10px;
    cursor: pointer;
    padding: 0;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
}

.navbar__burger span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 999px;
    transition: all 0.25s ease;
}

.navbar__burger.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.navbar__burger.active span:nth-child(2) {
    opacity: 0;
}

.navbar__burger.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ===== FOOTER ===== */
.footer {
    margin-top: auto;
    background: rgba(13, 13, 26, 0.75);
    border-top: 1px solid rgba(124, 58, 237, 0.12);
    padding: 24px;
    text-align: center;
}

.footer__container p {
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.8;
}

.footer__container a {
    color: var(--purple-light);
}

/* ===== HERO / INDEX PAGE ===== */
.hero-section {
    flex: 1;
    padding: 48px 24px 56px;
    background:
            radial-gradient(circle at 75% 30%, rgba(124, 58, 237, 0.12), transparent 28%),
            radial-gradient(circle at 65% 70%, rgba(168, 85, 247, 0.08), transparent 30%),
            #070312;
}

.hero__container {
    max-width: 1200px;
    margin: 0 auto;
    min-height: calc(100vh - 180px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 72px;
}

.hero__content {
    flex: 0 0 46%;
    max-width: 520px;
}

.hero__platform {
    font-size: 72px;
    font-weight: 900;
    line-height: 0.95;
    letter-spacing: -2px;
    color: #f5f1ff;
    margin-bottom: 24px;
}

.hero__subtitle {
    font-size: 22px;
    font-weight: 500;
    color: #a78bfa;
    margin-bottom: 28px;
}

.hero__description {
    font-size: 17px;
    line-height: 1.75;
    color: rgba(255, 255, 255, 0.68);
    margin-bottom: 72px;
    max-width: 500px;
}

.hero__store-buttons {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
}

.store-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: none;
    background: transparent;
    transition: transform 0.2s ease, filter 0.2s ease;
}

.store-btn:hover {
    transform: translateY(-3px);
    filter: brightness(1.05);
}

.store-btn__image {
    display: block;
    width: auto;
    height: 60px;
    max-width: 230px;
}

/* ===== MOCKUP ===== */
.hero__mockup {
    flex: 0 0 54%;
    display: flex;
    justify-content: center;
}

.hero__mockup-card {
    position: relative;
    width: 100%;
    max-width: 620px;
    min-height: 455px;
    padding: 34px 34px 28px;
    border-radius: 28px;
    background: linear-gradient(180deg, rgba(45, 20, 88, 0.88) 0%, rgba(31, 16, 60, 0.96) 100%);
    border: 1px solid rgba(180, 120, 255, 0.14);
    box-shadow:
            0 30px 60px rgba(0, 0, 0, 0.45),
            0 0 0 1px rgba(255, 255, 255, 0.02) inset,
            0 0 50px rgba(124, 58, 237, 0.18);
    overflow: visible;
}

.hero__mockup-card::before {
    content: "";
    position: absolute;
    top: -6px;
    left: 24px;
    right: 24px;
    height: 4px;
    border-radius: 999px;
    background: linear-gradient(90deg, transparent 0%, rgba(168, 85, 247, 0.95) 15%, rgba(217, 70, 239, 0.85) 85%, transparent 100%);
    box-shadow: 0 0 18px rgba(168, 85, 247, 0.45);
}

.hero__mockup-glow {
    position: absolute;
    left: 50%;
    bottom: -22px;
    transform: translateX(-50%);
    width: 82%;
    height: 64px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.35) 0%, rgba(139, 92, 246, 0.12) 45%, transparent 75%);
    filter: blur(18px);
    pointer-events: none;
}

.mockup-stage {
    position: relative;
    height: 320px;
    margin-bottom: 26px;
}

/* Общий телефон */
.mockup-phone {
    position: absolute;
}

.mockup-phone__frame {
    width: 210px;
    height: 438px;
    padding: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.mockup-phone__frame::before {
    display: none;
}

.mockup-phone__screen {
    width: 100%;
    height: 100%;
    border-radius: 0;
    overflow: visible;
    transform: translateY(-60px);
    background: transparent;
}

.mockup-screenshot {
    width: 120%;
    height: 120%;
    display: block;
    object-fit: cover;
}

/* Позиции как на макете */
.mockup-phone--left {
    left: 118px;
    top: -62px;
    z-index: 3;
}

.mockup-phone--right {
    right: 86px;
    top: -18px;
    z-index: 2;
}

.mockup-phone--left .mockup-phone__frame {
    transform: rotate(0deg);
}

.mockup-phone--right .mockup-phone__frame {
    transform: rotate(0deg);
    opacity: 0.92;
}

/* Footer карточки */
.hero__mockup-footer {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    padding-top: 8px;
}

.hero__mockup-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.hero__mockup-title {
    font-size: 20px;
    font-weight: 800;
    color: #ffffff;
}

.hero__mockup-version {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.55);
}

.hero__mockup-play {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 78px;
    height: 34px;
    padding: 0 16px;
    border-radius: 999px;
    background: rgba(139, 92, 246, 0.16);
    color: #a78bfa;
    font-size: 14px;
    font-weight: 700;
    transition: all 0.2s ease;
}

.hero__mockup-play:hover {
    background: rgba(139, 92, 246, 0.24);
    color: #c4b5fd;
}

/* ===== DANETKI PAGE ===== */
.danetki-page {
    flex: 1;
    padding: 32px 24px 60px;
}

.danetki__container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Categories */
.categories-section {
    margin-bottom: 24px;
}

.categories__title {
    color: var(--purple-light);
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 12px;
}

.categories__list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.category-btn {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    color: var(--text-primary);
    padding: 8px 18px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.category-btn:hover {
    border-color: var(--purple);
    color: var(--purple-light);
}

.category-btn.active {
    background: var(--purple-btn);
    border-color: var(--purple-btn);
    color: white;
}

/* Sort */
.sort-section {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.sort__label {
    color: var(--text-muted);
    font-size: 14px;
}

.sort__options {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.sort-link {
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    padding: 4px 12px;
    border-radius: 20px;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.sort-link:hover {
    color: var(--purple-light);
}

.sort-link--active {
    color: var(--purple-light);
    border-color: var(--purple);
    background: rgba(168, 85, 247, 0.1);
}

/* Grid */
.danetki__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

/* Card */
.danetka-card {
    display: block;
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-lg);
    padding: 20px;
    transition: all 0.2s;
    cursor: pointer;
}

.danetka-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--purple);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(168, 85, 247, 0.15);
}

.danetka-card__header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.danetka-card__icon {
    flex-shrink: 0;
}

.icon-placeholder {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--purple) 0%, var(--purple-dark) 100%);
}

.danetka-card__title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.3;
}

.danetka-card__question {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.danetka-card__footer {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.danetka-card__difficult {
    color: var(--purple-light);
    font-size: 12px;
    font-weight: 600;
}

.danetka-card__dot {
    color: var(--text-muted);
    font-size: 12px;
}

.danetka-card__time {
    color: var(--text-muted);
    font-size: 12px;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-muted);
    font-size: 16px;
}

/* ===== DANETKA DETAIL PAGE ===== */
.danetka-detail-page {
    flex: 1;
    padding: 40px 24px 60px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.danetka-detail__container {
    width: 100%;
    max-width: 680px;
}

.danetka-detail__card {
    background: linear-gradient(180deg, #1a1a35 0%, #13132a 100%);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-xl);
    padding: 40px 32px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    position: relative;
    overflow: hidden;
}

.danetka-detail__card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--purple-dark), var(--purple), var(--purple-light));
}

.danetka-detail__icon {
    margin-bottom: 20px;
}

.detail-icon-placeholder {
    width: 90px;
    height: 90px;
    border-radius: 22px;
    background: linear-gradient(135deg, #2a2a4a 0%, #1a1a35 100%);
    border: 1px solid var(--border-card);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 44px;
}

.danetka-detail__title-block {
    width: 100%;
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    margin-bottom: 16px;
}

.danetka-detail__name {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 6px;
}

.danetka-detail__meta {
    display: flex;
    align-items: center;
    gap: 8px;
}

.danetka-detail__time {
    color: var(--text-muted);
    font-size: 13px;
}

.danetka-detail__dot {
    color: var(--text-muted);
    font-size: 13px;
}

.danetka-detail__difficult {
    color: var(--purple-light);
    font-size: 13px;
    font-weight: 600;
}

.danetka-detail__question-block {
    width: 100%;
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-bottom: 16px;
}

.danetka-detail__task-label {
    color: var(--purple-light);
    font-size: 14px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.danetka-detail__question {
    color: var(--text-primary);
    font-size: 15px;
    line-height: 1.7;
    text-align: center;
}

.danetka-detail__answer-block {
    width: 100%;
    background: rgba(168, 85, 247, 0.08);
    border: 1px solid rgba(168, 85, 247, 0.3);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-bottom: 16px;
    animation: fadeIn 0.3s ease;
}

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

.danetka-detail__answer-label {
    color: var(--purple-light);
    font-size: 14px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.danetka-detail__answer {
    color: var(--text-primary);
    font-size: 15px;
    line-height: 1.7;
    text-align: center;
}

.danetka-detail__btn {
    width: 100%;
    background: var(--purple-btn);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    padding: 16px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.2s, transform 0.1s;
}

.danetka-detail__btn:hover {
    background: var(--purple-dark);
    transform: translateY(-1px);
}

/* ===== RULES PAGE ===== */
.rules-page {
    flex: 1;
    padding: 60px 24px;
}

.rules__container {
    max-width: 960px;
    margin: 0 auto;
}

.rules__title {
    font-size: 48px;
    font-weight: 800;
    color: var(--purple-light);
    text-align: center;
    margin-bottom: 12px;
}

.rules__subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 16px;
    margin-bottom: 48px;
}

.rules__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.rules__card {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-lg);
    padding: 28px;
}

.rules__card--wide {
    grid-column: 1 / -1;
}

.rules__card-number {
    width: 36px;
    height: 36px;
    background: var(--purple-btn);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 16px;
}

.rules__card-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 12px;
}

.rules__card-text {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.7;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1100px) {
    .hero__container {
        gap: 48px;
    }

    .hero__platform {
        font-size: 60px;
    }

    .hero__mockup-card {
        max-width: 560px;
        min-height: 420px;
    }

    .mockup-stage {
        height: 290px;
    }

    .mockup-phone__frame {
        width: 185px;
        height: 385px;
    }

    .mockup-phone--left {
        left: 110px;
        top: -44px;
    }

    .mockup-phone--right {
        right: 70px;
        top: -6px;
    }
}

@media (max-width: 900px) {
    .danetki__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero__container {
        flex-direction: column;
        align-items: center;
        text-align: center;
        min-height: auto;
    }

    .hero__content,
    .hero__mockup {
        flex: unset;
        max-width: 100%;
        width: 100%;
    }

    .hero__description {
        margin: 0 auto 48px;
    }

    .hero__store-buttons {
        justify-content: center;
        margin-bottom: 12px;
    }

    .hero__mockup {
        justify-content: center;
    }

    .hero__mockup-card {
        max-width: 620px;
    }

    .hero__mockup-footer {
        text-align: left;
    }

    .rules__grid {
        grid-template-columns: 1fr;
    }

    .rules__card--wide {
        grid-column: 1;
    }
}

@media (max-width: 768px) {
    .hero-section {
        padding: 36px 20px 48px;
    }

    .store-btn__image {
        max-width: 185px;
    }

    .hero__platform {
        font-size: 48px;
    }

    .hero__subtitle {
        font-size: 20px;
    }

    .hero__description {
        font-size: 15px;
        margin-bottom: 36px;
    }

    .hero__mockup-card {
        min-height: 360px;
        padding: 24px 20px 22px;
    }

    .mockup-stage {
        height: 235px;
        margin-bottom: 18px;
    }

    .mockup-phone__frame {
        width: 145px;
        height: 300px;
        border-radius: 24px;
        padding: 5px;
    }

    .mockup-phone__frame::before {
        width: 56px;
        height: 12px;
        top: 8px;
    }

    .mockup-phone__screen {
        border-radius: 19px;
    }

    .mockup-phone--left {
        left: 70px;
        top: -26px;
    }

    .mockup-phone--right {
        right: 44px;
        top: 8px;
    }

    .hero__mockup-title {
        font-size: 18px;
    }

    .hero__mockup-version {
        font-size: 13px;
    }
}

@media (max-width: 600px) {
    .danetki__grid {
        grid-template-columns: 1fr;
    }

    .navbar {
        padding: 0 16px;
    }

    .navbar__container {
        height: 64px;
        position: relative;
    }

    .navbar__burger {
        display: inline-flex;
    }

    .navbar__links {
        position: absolute;
        top: calc(100% + 10px);
        left: 0;
        right: 0;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding: 16px;
        background: rgba(19, 19, 42, 0.98);
        backdrop-filter: blur(10px);
        border: 1px solid var(--border-card);
        border-radius: 16px;
        box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
    }

    .navbar__links.active {
        display: flex;
    }

    .navbar__link {
        font-size: 15px;
        padding: 10px 4px;
    }

    .navbar__btn {
        text-align: center;
        width: 100%;
        padding: 12px 16px;
    }
}

@media (max-width: 480px) {
    .hero-section {
        padding: 32px 16px 40px;
    }

    .hero__platform {
        font-size: 38px;
    }

    .hero__subtitle {
        font-size: 17px;
    }

    .hero__description {
        font-size: 14px;
        line-height: 1.65;
    }

    .hero__store-buttons {
        gap: 12px;
    }

    .store-btn__image {
        max-width: 150px;
    }

    .hero__mockup-card {
        min-height: 310px;
        padding: 18px 14px 18px;
        border-radius: 22px;
    }

    .mockup-stage {
        height: 190px;
    }

    .mockup-phone__frame {
        width: 112px;
        height: 232px;
        border-radius: 20px;
    }

    .mockup-phone__frame::before {
        width: 44px;
        height: 10px;
    }

    .mockup-phone__screen {
        border-radius: 16px;
    }

    .mockup-phone--left {
        left: 38px;
        top: -18px;
    }

    .mockup-phone--right {
        right: 24px;
        top: 10px;
    }

    .hero__mockup-title {
        font-size: 16px;
    }

    .hero__mockup-version {
        font-size: 11px;
    }

    .hero__mockup-play {
        min-width: 64px;
        height: 30px;
        font-size: 13px;
        padding: 0 12px;
    }
}