/*
Theme Name: Lemon TV IPTV Theme
Theme URI: https://example.com/
Author: You
Description: IPTV лендинг + регистрация, вход и личный кабинет для Lemon TV.
Version: 2.9
Text Domain: lemon-tv-iptv
*/
body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #050816;
    color: #f9fafb;
}
a { color: #22c55e; text-decoration: none; }
a:hover { text-decoration: underline; }

.header {
    background: rgba(6, 12, 30, 0.95);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(148, 163, 184, 0.3);
    position: sticky;
    top: 0;
    z-index: 50;
}
.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.brand {
    display: flex;
    align-items: center;
    gap: 10px;
}
.brand img {
    width: 40px;
    height: 40px;
    border-radius: 999px;
}
.brand-title {
    font-weight: 700;
    font-size: 20px;
}
.nav {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 14px;
}
.nav a {
    padding: 6px 10px;
    border-radius: 999px;
}
.nav a.active {
    background: rgba(34, 197, 94, 0.15);
    color: #bbf7d0;
}
.nav .btn-outline {
    border: 1px solid #22c55e;
}
.nav .account-icon {
    font-size: 19px;
}

.main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px 40px; /* без отступа сверху */
}

.footer {
    border-top: 1px solid rgba(148, 163, 184, 0.3);
    padding: 20px;
    text-align: center;
    font-size: 13px;
    color: #9ca3af;
    background: #020617;
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1.5fr);
    gap: 40px;
    align-items: center;
    margin-top: 30px;
}
@media (max-width: 900px) {
    .hero {
        grid-template-columns: minmax(0, 1fr);
    }
}
.hero-title {
    font-size: 36px;
    line-height: 1.1;
    margin-bottom: 16px;
}
.hero-subtitle {
    font-size: 16px;
    color: #e5e7eb;
    margin-bottom: 20px;
}
.hero-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 10px;
}
.card {
    background: radial-gradient(circle at top left, rgba(34, 197, 94, 0.18), rgba(15, 23, 42, 0.96));
    border-radius: 18px;
    padding: 20px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.6);
}
.section-title {
    font-size: 24px;
    margin: 30px 0 10px;
}

/* FAQ */
.faq-item {
    margin-bottom: 12px;
}
.faq-q {
    font-weight: 600;
}
.faq-a {
    color: #e5e7eb;
    font-size: 14px;
}


/* Инструкция по настройке IPTV (аккордеон) */
.iptv-instructions {
    margin-top: 24px;
}
.iptv-accordion .iptv-accordion-item + .iptv-accordion-item {
    border-top: 1px solid #1f2933;
    margin-top: 4px;
    padding-top: 4px;
}
.iptv-accordion-header {
    width: 100%;
    text-align: left;
    background: transparent;
    border: none;
    color: #e5e7eb;
    font-weight: 600;
    padding: 10px 0;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.iptv-accordion-header::after {
    content: '+';
    font-weight: 700;
    margin-left: 8px;
    transition: transform 0.2s ease;
}
.iptv-accordion-item.is-open .iptv-accordion-header::after {
    content: '−';
    transform: rotate(0deg);
}
.iptv-accordion-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
    font-size: 14px;
    color: #d1d5db;
    padding-right: 4px;
}
.iptv-accordion-body ol,
.iptv-accordion-body ul {
    padding-left: 18px;
    margin: 6px 0 10px;
}
.iptv-accordion-body li {
    margin-bottom: 4px;
}

/* На мобильных — чуть уменьшить отступы */
@media (max-width: 768px) {
    .iptv-instructions {
        margin-top: 16px;
    }
    .iptv-accordion-header {
        padding: 8px 0;
        font-size: 14px;
    }
}

/* Формы */
.form-card {
    max-width: 420px;
    margin: 0 auto;
}
.form-card h2 {
    margin-top: 0;
    margin-bottom: 12px;
}
.form-card p.description {
    font-size: 14px;
    color: #9ca3af;
    margin-top: 0;
    margin-bottom: 20px;
}
.form-card label {
    display: block;
    font-size: 14px;
    margin-bottom: 6px;
}
.form-card input[type="email"],
.form-card input[type="password"],
.form-card input[type="text"] {
    width: 100%;
    padding: 9px 10px;
    border-radius: 10px;
    border: 1px solid #4b5563;
    background: #020617;
    color: #f9fafb;
    box-sizing: border-box;
}
.form-card button,
.button-primary {
    border-radius: 999px;
    border: none;
    padding: 10px 18px;
    background: #22c55e;
    color: #022c22;
    font-weight: 600;
    cursor: pointer;
}
.form-card button:hover,
.button-primary:hover {
    filter: brightness(1.05);
}

/* Каналы и фильтры */
.channels-section {
    margin-top: 10px;
    margin-bottom: 24px;
}
.channels-section .section-title {
    font-size: 18px;
    margin: 6px 0 8px;
}
.channel-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
}
.channel-filter-btn {
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.7);
    background: rgba(15, 23, 42, 0.9);
    color: #e5e7eb;
    padding: 6px 14px;
    font-size: 13px;
    cursor: pointer;
}
.channel-filter-btn.active {
    background: #22c55e;
    border-color: #22c55e;
    color: #022c22;
    font-weight: 600;
}
.channels-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 14px;
}
.channel-card {
    background: radial-gradient(circle at top left, rgba(34, 197, 94, 0.12), rgba(15, 23, 42, 0.96));
    border-radius: 14px;
    border: 1px solid rgba(51, 65, 85, 0.8);
    padding: 10px 10px 12px;
    text-align: center;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.6);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}
.channel-card img {
    width: 64px;
    height: 64px;
    object-fit: contain;
    border-radius: 12px;
    background: #020617;
}
.channel-card-name {
    font-size: 13px;
    color: #e5e7eb;
}


/* Мобильная правка шапки: чтобы "Главная" и "Регистрация" не ломали макет */
@media (max-width: 600px) {
    .header-inner {
        padding: 8px 10px;
    }
    .brand img {
        width: 32px;
        height: 32px;
    }
    .brand-title {
        font-size: 16px;
    }
    .nav {
        gap: 8px;
        font-size: 12px;
    }
    .nav a {
        padding: 4px 6px;
        white-space: nowrap; /* не переносить слова меню на две строки */
    }
}

/* Бургер-меню в правом верхнем углу для мобильной версии */
.burger {
    position: relative;
    margin-left: 12px;
    display: none; /* по умолчанию скрыт, показываем только на мобильных */
}

.burger input#burger-toggle {
    display: none;
}

.burger-icon {
    width: 28px;
    height: 22px;
    display: inline-flex;
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer;
}

.burger-icon span {
    display: block;
    height: 3px;
    border-radius: 999px;
    background: #ffffff;
}

.burger-menu {
    position: absolute;
    right: 0;
    top: 28px;
    background: #020617;
    border: 1px solid #1f2937;
    border-radius: 12px;
    padding: 8px;
    min-width: 170px;
    display: none;
    box-shadow: 0 12px 30px rgba(0,0,0,0.7);
    z-index: 50;
}

.burger-menu a {
    display: block;
    padding: 8px 10px;
    color: #e5e7eb;
    text-decoration: none;
    font-size: 14px;
}

.burger-menu a:hover {
    background: #111827;
}

/* показываем меню, когда бургер активен */
.burger input#burger-toggle:checked ~ .burger-menu {
    display: block;
}

/* На мобильных скрываем обычное меню и показываем бургер */
@media (max-width: 768px) {
    .header-inner {
        justify-content: space-between;
    }

    .nav {
        display: none;
    }

    .burger {
        display: block;
    }
}

/* Мобильная версия: компактная горизонтальная лента фильтров */
@media (max-width: 768px) {
    .channel-filters {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        gap: 6px;
        margin-bottom: 12px;
    }

    .channel-filter-btn {
        white-space: nowrap;
        font-size: 13px;
        padding: 4px 10px;
        flex: 0 0 auto;
    }
}

/* Десктоп: фильтр заканчивается на "Мужские", остальные категории открываются по кнопке "Еще..." */
@media (min-width: 769px) {
    .channel-filter-more {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border-radius: 999px;
        border: 1px dashed rgba(148, 163, 184, 0.7);
        background: transparent;
        color: #0ea5e9;
        padding: 4px 10px;
        font-size: 12px;
        cursor: pointer;
    }

    .channel-filter-btn-extra {
        display: none;
    }

    .channel-filters.filters-expanded .channel-filter-btn-extra {
        display: inline-flex;
    }

    .channel-filters.filters-expanded .channel-filter-more {
        display: none;
    }
}

/* Мобильная версия: скрываем кнопку "Еще..." в фильтре */
@media (max-width: 768px) {
    .channel-filter-more {
        display: none !important;
    }
}



/* IPTV instructions block */
.instructions-section {
    margin-top: 40px;
}
.instructions-card {
    padding: 24px;
}
.instructions-intro {
    margin-bottom: 16px;
    opacity: 0.9;
}
.instructions-layout {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
}
.instructions-left {
    flex: 0 0 320px;
    max-width: 360px;
}
.instructions-right {
    flex: 1 1 0;
    min-width: 280px;
}
.instructions-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}
.instruction-filter-btn {
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.15);
    padding: 6px 14px;
    background: transparent;
    font-size: 14px;
    cursor: pointer;
    color: #4aa3ff;
}
.instruction-filter-btn.active {
    background: #ffd54f;
    color: #000;
    border-color: #ffd54f;
}
.instructions-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}
.instruction-item {
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.instruction-tile {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 10px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    cursor: pointer;
    text-align: left;
}
.instruction-tile:hover {
    background: rgba(255,255,255,0.06);
}
.instruction-tile.active {
    background: rgba(255,255,255,0.10);
    border-color: #ffd54f;
}
.instruction-tile-icon img {
    width: 32px;
    height: 32px;
    object-fit: contain;
    display: block;
}

.instruction-tile-icon img[alt="SS IPTV"] {
    width: 36px;
    height: 36px;
}

.instruction-tile-text {
    display: flex;
    flex-direction: column;
    font-size: 13px;
}
.instruction-tile-name {
    font-weight: 600;
    color: #4aa3ff;
}
.instruction-tile-device {
    font-size: 11px;
    opacity: 0.8;
    color: #4aa3ff;
}

/* viewer */
.instructions-viewer {
    background: rgba(0,0,0,0.35);
    border-radius: 16px;
    padding: 12px;
    border: 1px solid rgba(255,255,255,0.08);
    min-height: 300px;
}
.instructions-viewer-placeholder {
    font-size: 14px;
    opacity: 0.8;
}
.instructions-viewer-frame {
    width: 100%;
    height: 480px;
    border: none;
    display: none;
    border-radius: 12px;
    background: #000;
}

/* responsive */
@media (max-width: 992px) {
    .instructions-layout {
        flex-direction: column;
    }
    .instructions-left {
        max-width: 100%;
    }
    .instructions-viewer-frame {
        height: 380px;
    }
}
@media (max-width: 600px) {
    .instructions-viewer-frame {
        height: 320px;
    }
}


/* Updated offer block under channels grid */
.channels-offer {
    margin: 20px 0 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px 24px;
    padding: 16px 20px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(255,213,79,0.18), rgba(74,163,255,0.12));
    border: 1px solid rgba(255,255,255,0.16);
    width: 100%;
}
.channels-offer-text {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 8px 12px;
    font-size: 16px;
}
.channels-offer-main {
    font-weight: 600;
}
.channels-offer-price-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 14px;
    border-radius: 999px;
    background: #ffd54f;
    color: #000;
    font-weight: 800;
    font-size: 16px;
    box-shadow: 0 6px 14px rgba(0,0,0,0.45);
    white-space: nowrap;
}
.channels-offer-sub {
    opacity: 0.95;
    font-weight: 500;
}
.channels-offer-actions {
    margin-left: auto;
}
.channels-offer-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 22px;
    border-radius: 999px;
    background: #4aa3ff;
    color: #fff;
    font-weight: 700;
    font-size: 15px;
    text-decoration: none;
    box-shadow: 0 6px 16px rgba(0,0,0,0.45);
}
.channels-offer-btn:hover {
    background: #63b3ff;
}

/* responsive for small screens */
@media (max-width: 640px) {
    .channels-offer {
        flex-direction: column;
        align-items: flex-start;
    }
    .channels-offer-actions {
        margin-left: 0;
    }
}


/* Slightly more compact channel cards on desktop */
@media (min-width: 1024px) {
    .channel-card {
        padding: 8px 8px 9px;
        gap: 4px;
    }
    .channel-card img {
        width: 56px;
        height: 56px;
    }
}


/* Centered channels offer text & button */
.channels-offer {
    justify-content: center;
    gap: 8px 16px;
    text-align: center;
}
.channels-offer-text {
    justify-content: center;
}
.channels-offer-actions {
    margin-left: 0;
}

/* On small screens keep everything centered as a column */
@media (max-width: 640px) {
    .channels-offer {
        align-items: center;
    }
}


/* Prevent horizontal overflow of offer block on mobile */
.channels-offer {
    max-width: 100%;
    box-sizing: border-box;
}
.channels-offer-text {
    min-width: 0;
}

@media (max-width: 640px) {
    .channels-offer-text {
        text-align: center;
    }
    .channels-offer-price-badge {
        white-space: normal;
    }
}


.footer-legal-links {
    margin-top: 8px;
    font-size: 12px;
    opacity: 0.9;
}

.footer-legal-links a {
    color: #9ca3af;
}

.footer-legal-links a:hover {
    color: #f9fafb;
    text-decoration: underline;
}

.footer-legal-separator {
    margin: 0 6px;
}


.legal-section .section-title {
    margin-bottom: 16px;
}

.legal-content {
    font-size: 14px;
    line-height: 1.6;
}

.legal-content h2 {
    margin-top: 18px;
    margin-bottom: 8px;
    font-size: 16px;
}

.legal-content ul {
    padding-left: 18px;
    margin-bottom: 10px;
}

.legal-content p {
    margin-bottom: 8px;
}

