/* ==================== СТИЛИ ГЛАВНОЙ СТРАНИЦЫ ==================== */

nav {
    padding: 1rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.9);
    transition: all 0.3s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

body.dark-theme nav {
    background: rgba(3, 3, 5, 0.9);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.nav-controls {
    display: flex;
    gap: 15px;
    align-items: center;
}

.logo {
    font-family: var(--font-head);
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-text {
    font-family: var(--font-head);
    font-weight: 800;
}

.hero {
    padding: 8rem 5% 6rem;
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 4rem;
    align-items: center;
    min-height: 90vh;
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
}

/* Красивая анимация для hero секции */
.hero::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--primary-glow) 0%, transparent 70%);
    border-radius: 50%;
    opacity: 0;
    animation: heroGlow 8s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes heroGlow {
    0%, 100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8);
    }
    50% {
        opacity: 0.3;
        transform: translate(-50%, -50%) scale(1.2);
    }
}

.hero-text {
    z-index: 2;
}

.system-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 20px;
    font-family: var(--font-code);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 2rem;
    background: transparent !important;
}

.status-indicator {
    width: 8px;
    height: 8px;
    background: var(--success);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.hero-text h1 {
    font-family: var(--font-head);
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: var(--text-main);
}

.text-primary {
    color: var(--primary);
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-text p {
    font-size: 1.2rem;
    line-height: 1.7;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    max-width: 600px;
}

.cta-group {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn-primary {
    padding: 14px 32px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(79, 70, 229, 0.4);
}

.btn-secondary {
    padding: 14px 32px;
    background: transparent;
    color: var(--text-primary);
    border: 1px solid rgba(79, 70, 229, 0.35);
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    backdrop-filter: blur(8px);
}

.btn-secondary:hover {
    transform: translateY(-2px);
    border-color: rgba(79, 70, 229, 0.65);
    box-shadow: 0 8px 22px rgba(79, 70, 229, 0.18);
}

body.dark-theme .btn-secondary {
    border-color: rgba(129, 140, 248, 0.45);
}

body.dark-theme .btn-secondary:hover {
    border-color: rgba(165, 180, 252, 0.75);
    box-shadow: 0 8px 22px rgba(99, 102, 241, 0.22);
}

body.dark-theme .btn-primary {
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

body.dark-theme .btn-primary:hover {
    box-shadow: 0 10px 25px rgba(99, 102, 241, 0.5);
}

.visual-container {
    position: relative;
    z-index: 1;
}

.glass-mockup {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 1.5rem;
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow-soft);
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 1.5rem;
    max-width: 600px;
    margin: 0 auto;
    animation: floatMockup 6s ease-in-out infinite;
    transition: transform 0.3s ease;
}

.glass-mockup:hover {
    transform: perspective(1000px) rotateY(5deg) rotateX(2deg);
}

@keyframes floatMockup {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-10px) rotate(0.5deg);
    }
}

.mockup-sidebar {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sb-item {
    height: 40px;
    background: var(--glass-bg-hover);
    border-radius: 8px;
    border: 1px solid var(--glass-border);
    animation: fadeInLeft 1s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    animation-delay: calc(var(--sb-delay, 0) * 0.25s);
    opacity: 0;
    transform: translateX(-15px);
    flex: 1;
    min-width: 0;
}

@media (max-width: 1024px) {
    .sb-item {
        height: 35px;
    }
}

.sb-item:nth-child(1) { --sb-delay: 1; }
.sb-item:nth-child(2) { --sb-delay: 2; }
.sb-item:nth-child(3) { --sb-delay: 3; }
.sb-item:nth-child(4) { --sb-delay: 4; }

@keyframes fadeInLeft {
    0% {
        opacity: 0;
        transform: translateX(-15px) scale(0.9);
    }
    100% {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

.sb-item.active {
    background: var(--primary);
    border-color: var(--primary);
}

.sb-item-bottom {
    margin-top: auto;
}

.mockup-main {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.mockup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--glass-border);
}

.live-tag {
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 12px;
    font-weight: 700;
    letter-spacing: 0.8px;
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.2), rgba(16, 185, 129, 0.15));
    color: #0f172a; /* Черный/темно-серый для светлой темы */
    border: 1px solid rgba(0, 255, 136, 0.3);
    animation: pulseLive 3s infinite alternate ease-in-out;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    cursor: pointer;
    font-size: 0.65rem;
    font-family: var(--font-code);
    text-transform: uppercase;
    box-shadow: 0 2px 8px rgba(0, 255, 136, 0.2);
}

/* Для темной темы - белый текст */
body.dark-theme .live-tag {
    color: #ffffff; /* Белый для темной темы */
}

.live-tag::before {
    content: '';
    width: 6px;
    height: 6px;
    background: #00ff88;
    border-radius: 50%;
    animation: livePulse 2s infinite;
    box-shadow: 0 0 8px #00ff88;
}

@keyframes livePulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(0.8);
    }
}

.live-tag:hover {
    transform: translateY(-2px) scale(1.08);
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.3), rgba(16, 185, 129, 0.25));
    border-color: rgba(0, 255, 136, 0.5);
    box-shadow: 0 4px 20px rgba(0, 255, 136, 0.5), 0 0 30px rgba(0, 255, 136, 0.3);
    letter-spacing: 1px;
}

.live-tag:active {
    transform: translateY(0) scale(1.05);
}

@keyframes pulseLive {
    0% {
        background-color: rgba(0, 255, 136, 0.15);
        box-shadow: 0 0 5px rgba(0, 255, 136, 0.3);
        transform: scale(1);
    }
    100% {
        background-color: rgba(0, 255, 136, 0.25);
        box-shadow: 0 0 15px rgba(0, 255, 136, 0.5), 0 0 30px rgba(0, 255, 136, 0.2);
        transform: scale(1.02);
    }
}

/* Для светлой темы немного темнее тени при наведении */
body:not(.dark-theme) .live-tag:hover {
    transform: translateY(-2px) scale(1.08);
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.25), rgba(16, 185, 129, 0.2));
    border-color: rgba(0, 255, 136, 0.4);
    box-shadow: 0 4px 20px rgba(0, 255, 136, 0.4), 0 0 25px rgba(0, 255, 136, 0.2);
    letter-spacing: 1px;
    color: #0f172a;
}

.window-controls {
    display: flex;
    gap: 6px;
}

.win-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--text-muted);
}

.dot-red {
    background: #ff5f57;
}

.dot-yellow {
    background: #ffbd2e;
}

.widget {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 1.5rem;
    min-height: 120px;
}

.widget-main {
    grid-column: 1 / -1;
}

.widget-value {
    font-size: 2rem;
    font-weight: 800;
    font-family: var(--font-head);
    color: var(--text-main);
    margin-bottom: 0.5rem;
}

.widget-sub {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.graph-area {
    display: flex;
    gap: 8px;
    align-items: flex-end;
    height: 80px;
}

.bar-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 3px;
    animation: barRise 1.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    animation-delay: calc(var(--delay, 0) * 0.15s);
    transform-origin: bottom;
    opacity: 0;
}

.bar-col:nth-child(1) { --delay: 1; }
.bar-col:nth-child(2) { --delay: 2; }
.bar-col:nth-child(3) { --delay: 3; }
.bar-col:nth-child(4) { --delay: 4; }
.bar-col:nth-child(5) { --delay: 5; }
.bar-col:nth-child(6) { --delay: 6; }
.bar-col:nth-child(7) { --delay: 7; }

@keyframes barRise {
    0% {
        transform: scaleY(0);
        opacity: 0;
    }
    60% {
        transform: scaleY(1.1);
        opacity: 0.8;
    }
    100% {
        transform: scaleY(1);
        opacity: 1;
    }
}

.bar-seg {
    background: linear-gradient(180deg, var(--primary), var(--accent));
    border-radius: 4px 4px 0 0;
    min-height: 8px;
}

.widget-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.widget-active {
    border-color: var(--primary);
    background: var(--primary-glow);
}

.marquee-section {
    padding: 4rem 0;
    background: var(--bg-secondary);
    border-top: 1px solid var(--glass-border);
    border-bottom: 1px solid var(--glass-border);
    overflow: hidden;
    position: relative;
}

.marquee-track {
    display: flex;
    gap: 3rem;
    animation: marquee 30s linear infinite;
}

@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-33.333%); }
}

.marquee-content {
    display: flex;
    gap: 3rem;
    flex-shrink: 0;
}

.marquee-item {
    font-family: var(--font-code);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-muted);
    white-space: nowrap;
    opacity: 0.6;
    transition: opacity 0.3s;
}

.marquee-item:hover {
    opacity: 1;
    color: var(--primary);
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    padding: 4rem 5%;
    max-width: 1400px;
    margin: 0 auto;
}

.metric-card {
    text-align: center;
    padding: 2rem;
    background: transparent;
    border: 1px solid rgba(100, 100, 255, 0.1);
    border-radius: 16px;
    transition: all 0.3s ease;
}

body.dark-theme .metric-card {
    background: rgba(25, 25, 40, 0.6);
    border-color: rgba(100, 100, 255, 0.2);
}

.metric-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
}

.metric-val {
    font-size: 3rem;
    font-weight: 800;
    font-family: var(--font-head);
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.metric-lbl {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-family: var(--font-code);
    font-weight: 700;
}

.faq-section {
    padding: 6rem 5%;
    max-width: 900px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header .tag {
    display: inline-block;
    padding: 6px 12px;
    background: var(--primary-glow);
    color: var(--primary);
    border-radius: 6px;
    font-family: var(--font-code);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.section-header h2 {
    font-family: var(--font-head);
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-main);
}

.faq-item {
    margin-bottom: 1rem;
}

.faq-item details {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

body.dark-theme .faq-item details {
    background: rgba(25, 25, 40, 0.6);
    border-color: rgba(100, 100, 255, 0.2);
}

.faq-item summary {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text-main);
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::before {
    content: '+';
    font-size: 1.5rem;
    color: var(--primary);
    font-weight: 300;
    transition: transform 0.3s;
}

.faq-item details[open] summary::before {
    transform: rotate(45deg);
}

.faq-content {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--glass-border);
    color: var(--text-muted);
    line-height: 1.7;
}

footer {
    padding: 3rem 5%;
    text-align: center;
    background: var(--bg-secondary);
    border-top: 1px solid var(--glass-border);
    color: var(--text-muted);
    font-family: var(--font-code);
    font-size: 0.85rem;
}

body.dark-theme footer {
    background: rgba(15, 15, 25, 0.8);
}

/* ==================== АНИМАЦИИ ==================== */

.visual-container.reveal {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1.2s cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
    animation-delay: 0.5s;
}

@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(30px) scale(0.98);
    }
    60% {
        opacity: 0.8;
        transform: translateY(-2px) scale(1.01);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.theme-btn.switching {
    animation: themeSwitch 0.6s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

@keyframes themeSwitch {
    0% {
        transform: scale(1) rotate(0deg);
    }
    50% {
        transform: scale(0.85) rotate(180deg);
    }
    100% {
        transform: scale(1) rotate(360deg);
    }
}

.theme-notification {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: linear-gradient(135deg, rgba(74, 111, 255, 0.9), rgba(138, 47, 255, 0.9));
    color: white;
    padding: 12px 24px;
    border-radius: 10px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    font-weight: 600;
    opacity: 0;
    transform: translateY(20px) translateX(20px);
    transition: opacity 0.4s cubic-bezier(0.22, 0.61, 0.36, 1), 
                transform 0.4s cubic-bezier(0.22, 0.61, 0.36, 1);
    z-index: 1000;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    pointer-events: none;
}

.theme-notification.show {
    opacity: 1;
    transform: translateY(0) translateX(0);
}

.reveal {
    opacity: 0;
    transform: translateY(20px);
    animation: revealElement 1s cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
    animation: none;
}

@keyframes revealElement {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-text.reveal {
    animation-delay: 0.2s;
}

.metrics-grid.reveal {
    animation-delay: 0.6s;
}

.faq-section.reveal {
    animation-delay: 0.8s;
}

/* ==================== АДАПТИВНОСТЬ ==================== */

@media (max-width: 1024px) {
    .hero {
        grid-template-columns: 1fr;
        gap: 3rem;
        padding: 4rem 5% 3rem;
        min-height: auto;
    }
    
    .hero::before {
        width: 400px;
        height: 400px;
    }
    
    /* hero-text первым, visual-container вторым */
    .hero-text {
        order: 1;
        text-align: center;
    }
    
    .visual-container {
        order: 2;
    }
    
    .glass-mockup {
        max-width: 100%;
        display: grid;
        grid-template-columns: 80px 1fr;
        gap: 1.5rem;
    }
    
    /* Делаем сайдбар вертикальным для мобильных */
    .mockup-sidebar {
        flex-direction: column;
        justify-content: flex-start;
        width: auto;
        margin-bottom: 0;
    }
    
    .hero-text p {
        margin: 0 auto 2.5rem;
    }
    
    .cta-group {
        justify-content: center;
    }
    
    .system-status {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    nav {
        padding: 1rem 4%;
    }
    
    .logo {
        font-size: 1.2rem;
    }
    
    /* Кнопка темы всегда видна */
    .theme-btn {
        display: flex !important;
        align-items: center;
        justify-content: center;
    }
    
    .hero {
        padding: 3rem 4% 2rem;
    }
    
    .hero::before {
        width: 300px;
        height: 300px;
    }
    
    .hero-text h1 {
        font-size: clamp(1.8rem, 8vw, 2.5rem);
        margin-bottom: 1rem;
    }
    
    .hero-text p {
        font-size: 1rem;
        margin-bottom: 2rem;
    }
    
    .btn-primary {
        padding: 12px 24px;
        font-size: 0.95rem;
        width: 100%;
        max-width: 300px;
    }
    
    .glass-mockup {
        padding: 1rem;
        border-radius: 16px;
        display: grid;
        grid-template-columns: 60px 1fr;
        gap: 1rem;
    }
    
    .mockup-sidebar {
        flex-direction: column;
        padding: 0;
    }
    
    .mockup-main {
        padding: 0;
    }
    
    /* LIVE_DATA_FEED просто уменьшаем размер */
    .live-tag {
        font-size: 0.55rem;
        padding: 4px 10px;
    }
    
    /* widget-main остается таким же, только размеры меняются */
    .widget-value {
        font-size: 1.5rem;
    }
    
    .graph-area {
        height: 60px;
    }
    
    /* Уменьшаем элементы сайдбара */
    .sb-item {
        height: 30px;
    }
    
    .marquee-section {
        padding: 2rem 0;
    }
    
    .marquee-item {
        font-size: 0.9rem;
        margin: 0 1rem;
    }
    
    .metrics-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
        padding: 2rem 4%;
    }
    
    .metric-card {
        padding: 1.5rem 1rem;
    }
    
    .metric-val {
        font-size: 2rem;
    }
    
    .metric-lbl {
        font-size: 0.75rem;
    }
    
    .faq-section {
        padding: 3rem 4%;
    }
    
    .section-header h2 {
        font-size: 1.8rem;
    }
    
    .faq-item details {
        padding: 1rem;
    }
    
    summary {
        font-size: 0.95rem;
        padding: 1rem;
    }
    
    .faq-content {
        padding: 0 1rem 1rem;
        font-size: 0.9rem;
    }
    
    footer {
        padding: 2rem 4%;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    nav {
        padding: 0.8rem 3%;
    }
    
    .logo {
        font-size: 1.1rem;
        gap: 8px;
    }
    
    .logo-dot {
        width: 8px;
        height: 8px;
    }
    
    .hero {
        padding: 2rem 3% 1.5rem;
    }
    
    .hero::before {
        width: 250px;
        height: 250px;
    }
    
    .system-status {
        font-size: 0.65rem;
        padding: 6px 12px;
    }
    
    .hero-text h1 {
        font-size: 1.6rem;
        line-height: 1.2;
    }
    
    .hero-text p {
        font-size: 0.9rem;
    }
    
    .glass-mockup {
        padding: 0.8rem;
        grid-template-columns: 50px 1fr;
        gap: 0.8rem;
    }
    
    .mockup-sidebar {
        gap: 6px;
    }
    
    .sb-item {
        height: 25px;
    }
    
    .mockup-main {
        padding: 0;
    }
    
    /* widget-main остается таким же, только размеры меняются */
    .widget {
        padding: 12px;
    }
    
    .widget-value {
        font-size: 1.2rem;
    }
    
    .widget-sub {
        font-size: 0.7rem;
    }
    
    .graph-area {
        height: 50px;
        gap: 4px;
    }
    
    .metrics-grid {
        grid-template-columns: 1fr;
        gap: 0.8rem;
        padding: 1.5rem 3%;
    }
    
    .metric-val {
        font-size: 1.8rem;
    }
    
    .section-header h2 {
        font-size: 1.5rem;
    }
    
    .section-header .tag {
        font-size: 0.65rem;
        padding: 4px 8px;
    }
}

/* ——— Модалка «Скачать» (платформы) ——— */
.hero-download-hint {
    flex-basis: 100%;
    margin-top: 10px;
    font-size: 0.9rem;
    line-height: 1.5;
    opacity: 0.88;
    color: var(--text-muted);
    max-width: 640px;
}

.download-platform-modal {
    position: fixed;
    inset: 0;
    z-index: 10050;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.28s ease, visibility 0.28s ease;
}

.download-platform-modal.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.download-platform-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(10px);
}

.download-platform-dialog {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 720px;
    max-height: min(90vh, 640px);
    overflow-y: auto;
    padding: 1.75rem 1.5rem 1.5rem;
    border-radius: 20px;
    background: var(--glass-bg, rgba(255, 255, 255, 0.95));
    border: 1px solid var(--glass-border);
    box-shadow: 0 25px 60px -12px rgba(0, 0, 0, 0.35);
    transform: translateY(12px) scale(0.98);
    transition: transform 0.28s cubic-bezier(0.34, 1.2, 0.64, 1);
}

body.dark-theme .download-platform-dialog {
    background: rgba(18, 18, 24, 0.96);
}

.download-platform-modal.is-open .download-platform-dialog {
    transform: translateY(0) scale(1);
}

.download-platform-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: var(--text-muted);
    font-size: 1.75rem;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.download-platform-close:hover {
    background: rgba(79, 70, 229, 0.12);
    color: var(--text-main);
}

.download-platform-title {
    font-family: var(--font-head);
    font-size: 1.35rem;
    font-weight: 800;
    margin: 0 2.5rem 0.35rem 0;
    color: var(--text-main);
}

.download-platform-lead {
    margin: 0 0 1.25rem;
    font-size: 0.95rem;
    color: var(--text-muted);
}

.download-platform-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.85rem;
}

@media (max-width: 560px) {
    .download-platform-grid {
        grid-template-columns: 1fr;
    }
}

.download-platform-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
    padding: 1rem 1rem 0.9rem;
    border-radius: 14px;
    text-decoration: none;
    color: inherit;
    border: 1px solid rgba(79, 70, 229, 0.22);
    background: rgba(255, 255, 255, 0.55);
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

body.dark-theme .download-platform-card {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(129, 140, 248, 0.28);
}

.download-platform-card:hover {
    border-color: rgba(79, 70, 229, 0.55);
    box-shadow: 0 8px 24px rgba(79, 70, 229, 0.15);
    transform: translateY(-2px);
}

body.dark-theme .download-platform-card:hover {
    border-color: rgba(165, 180, 252, 0.45);
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.2);
}

.download-platform-card--pwa {
    border-style: dashed;
}

.download-platform-card-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.25rem;
    height: 2.25rem;
    padding: 0 0.45rem;
    border-radius: 8px;
    font-family: var(--font-head);
    font-weight: 800;
    font-size: 0.72rem;
    letter-spacing: 0.02em;
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--accent));
}

.download-platform-card-name {
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--text-main);
    margin-top: 0.15rem;
}

.download-platform-card-desc {
    font-size: 0.8rem;
    line-height: 1.45;
    color: var(--text-muted);
}

.download-platform-card--stack {
    cursor: default;
}

.download-platform-card--stack:hover {
    transform: none;
}

.download-platform-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
    margin-top: 0.5rem;
}

.download-platform-btn {
    display: block;
    width: 100%;
    text-align: center;
    padding: 0.55rem 0.75rem;
    border-radius: 10px;
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid transparent;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff;
    transition: opacity 0.2s, border-color 0.2s, background 0.2s;
}

.download-platform-btn:hover {
    opacity: 0.92;
    color: #fff;
}

.download-platform-btn--outline {
    background: transparent;
    color: var(--primary);
    border-color: rgba(79, 70, 229, 0.45);
}

body.dark-theme .download-platform-btn--outline {
    color: #a5b4fc;
    border-color: rgba(165, 180, 252, 0.45);
}

.download-platform-btn--outline:hover {
    background: rgba(79, 70, 229, 0.1);
    opacity: 1;
}