/* ============================================================
   EdvardCode — base.css (v2.0)
   Общие стили + страницы 404 / Windows / Игры
   ============================================================ */

/* ===== ШРИФТЫ ===== */
@font-face {
    font-family: "sf";
    src: url("fonts/sf.ttf") format("opentype");
    font-weight: normal;
    font-style: normal;
}

/* ===== ПЕРЕМЕННЫЕ ===== */
:root {
    --primary: #ff073a;
    --primary-soft: rgba(255, 7, 58, 0.15);
    --primary-border: rgba(255, 7, 58, 0.35);
    --bg-dark: #09090b;
    --surface: rgba(255, 255, 255, 0.04);
    --surface-strong: rgba(255, 255, 255, 0.06);
    --border: rgba(255, 255, 255, 0.09);
    --text: #f4f4f5;
    --text-dim: #9ca3af;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
    --radius-lg: 28px;
    --radius-md: 16px;
    --radius-sm: 10px;
    --speed: 0.3s;

    /* цвета «подсветки синтаксиса» */
    --syn-ok:    #22c55e;
    --syn-warn:  #f59e0b;
    --syn-info:  #7aa2f7;
}

/* ===== СБРОС ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

::selection { background: rgba(255, 7, 58, 0.35); color: #fff; }

::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: #0a0a0c; }
::-webkit-scrollbar-thumb {
    background: #26262c;
    border-radius: 99px;
    border: 2px solid #0a0a0c;
}
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

body {
    font-family: "sf", sans-serif;
    color: var(--text);
    background: var(--bg-dark);
    overflow-x: hidden;
    min-height: 100vh;
}

.mono { font-family: var(--font-mono); }

/* ===== ФОН: СЕТКА + СВЕЧЕНИЯ ===== */
.animated-bg {
    position: fixed;
    inset: 0;
    z-index: -2;
    overflow: hidden;
    background: var(--bg-dark);
}
.animated-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
    background-size: 48px 48px;
    -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 30%, transparent 100%);
    mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 30%, transparent 100%);
}
.bg-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    will-change: transform;
}
.bg-glow--1 {
    width: 520px; height: 520px;
    background: var(--primary);
    opacity: 0.14;
    top: -180px; left: -120px;
    animation: drift1 26s ease-in-out infinite alternate;
}
.bg-glow--2 {
    width: 460px; height: 460px;
    background: #1d4ed8;
    opacity: 0.10;
    bottom: -160px; right: -100px;
    animation: drift2 32s ease-in-out infinite alternate;
}
@keyframes drift1 { to { transform: translate(120px, 80px); } }
@keyframes drift2 { to { transform: translate(-100px, -60px); } }

/* ===== ШАПКА ===== */
header {
    position: sticky;
    top: 12px;
    z-index: 100;
    width: min(92%, 1400px);
    margin: 0 auto;
    padding: 10px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(13, 13, 16, 0.7);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border);
    border-radius: 18px;
    transition: all var(--speed);
}
.header-narrow {
    padding: 6px 14px !important;
    border-radius: 14px !important;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text);
    font-weight: 700;
    font-size: 1.15rem;
    transition: transform var(--speed);
}
.logo:hover { transform: scale(1.03); }
.logo-mark {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--primary);
    background: var(--primary-soft);
    border: 1px solid var(--primary-border);
    padding: 6px 8px;
    border-radius: 8px;
}
.logo-text em { color: var(--primary); font-style: normal; }
.logo-cursor { color: var(--primary); animation: blink 1.1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.site-icon {
    height: 36px;
    width: 36px;
    border-radius: 10px;
}

/* ===== НАВИГАЦИЯ ===== */
nav ul { display: flex; gap: 6px; list-style: none; }
nav a {
    font-family: var(--font-mono);
    font-size: 0.82rem;
    padding: 8px 14px;
    border-radius: 999px;
    color: var(--text-dim);
    text-decoration: none;
    transition: all var(--speed);
}
nav a:hover {
    color: var(--text);
    background: var(--surface);
    transform: translateY(-1px);
}
nav a.active-link {
    color: var(--primary);
    background: var(--primary-soft);
    box-shadow: inset 0 0 0 1px var(--primary-border);
    pointer-events: none;
}

/* ===== ОСНОВНОЙ КОНТЕЙНЕР ===== */
main {
    width: min(92%, 1400px);
    margin: 24px auto 0;
    padding: 48px clamp(20px, 4vw, 56px) 64px;
    min-height: 80vh;
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    position: relative;
    z-index: 1;
}

/* ===== КНОПКИ‑МЕНЮ (старые .menu-button — на случай если используются) ===== */
.page { width: 100%; margin-top: 32px; }
.button-menu-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.row {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}
.menu-button {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    border-radius: var(--radius-md);
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
    text-decoration: none;
    transition: all var(--speed);
}
.menu-button:hover {
    border-color: var(--primary-border);
    background: var(--surface-strong);
    transform: translateY(-3px);
}
.button-icon { width: 22px; height: 22px; opacity: 0.9; }

/* ===== ПОДВАЛ ===== */
footer {
    width: min(92%, 1400px);
    margin: 24px auto 40px;
    padding: 14px 22px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 999px;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-dim);
    position: relative;
    z-index: 1;
}
#trademark { color: var(--text-dim); }
.footer-sep { opacity: 0.4; }
.footer-code { color: var(--primary); }

.social-icon {
    width: 24px;
    height: 24px;
    border-radius: 8px;
    padding: 3px;
    transition: all 0.3s;
}
.social-link:hover .social-icon {
    box-shadow: 0 0 0 2px var(--primary);
    transform: rotate(10deg);
}

/* ===== БУРГЕР ===== */
#burger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    cursor: pointer;
    position: relative;
    padding: 0;
    background: none;
    border: none;
    margin-right: 8px;
}
#burger::before {
    content: "меню";
    position: absolute;
    right: 40px;
    top: 50%;
    transform: translateY(-50%);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-dim);
    white-space: nowrap;
}
#burger span {
    display: block;
    height: 3px;
    width: 100%;
    background: var(--primary);
    border-radius: 3px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
#burger.active span:nth-child(1) { transform: rotate(45deg) translate(6px, 6px); }
#burger.active span:nth-child(2) { opacity: 0; transform: translateX(-10px); }
#burger.active span:nth-child(3) { transform: rotate(-45deg) translate(6px, -6px); }

/* скрытые пункты бургера (показываются на мобильных) */
#buildsburger, #edvardtoolsburger, #supportburger { display: none; }

/* ===== ВЫПАДАЮЩЕЕ МЕНЮ ===== */
.menu-container {
    position: fixed;
    top: 80px;
    right: 5%;
    z-index: 999;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: rgba(13, 13, 16, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}
.menu-container.show { opacity: 1; transform: translateY(0); }
.menu-items {
    display: flex;
    flex-direction: column;
    padding: 12px;
    min-width: 260px;
}
.menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    color: var(--text);
    text-decoration: none;
    border-radius: 10px;
    margin-bottom: 4px;
    font-size: 0.95em;
    transition: all 0.25s;
}
.menu-item:hover {
    background: var(--primary-soft);
    color: var(--primary);
    transform: translateX(4px);
}
.menu-item.active-link {
    background: var(--primary-soft);
    color: var(--primary);
    box-shadow: inset 0 0 0 1px var(--primary-border);
}
.menu-item img { width: 20px; height: 20px; opacity: 0.85; border-radius: 5px; }

/* ===== КНОПКА СНЕГА ===== */
.snowflake-toggle {
    position: fixed;
    bottom: 25px;
    left: 25px;
    z-index: 999999;
}
#snowToggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    color: white;
    font-size: 22px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}
#snowToggle:hover {
    border-color: var(--primary);
    transform: scale(1.08);
    box-shadow: 0 0 20px rgba(255, 7, 58, 0.4);
}
#snowToggle.active {
    background: var(--primary-soft);
    border-color: var(--primary);
    box-shadow: 0 0 25px rgba(255, 7, 58, 0.6);
}
.snow-status {
    font-family: var(--font-mono);
    font-size: 9px;
    opacity: 0.8;
}

/* ===== СНЕЖИНКИ ===== */
#snowflakes-container {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    z-index: 999999;
    overflow: hidden;
}
.snowflake {
    position: absolute;
    top: -50px;
    background: white;
    border-radius: 50%;
    pointer-events: none;
    opacity: 0.8;
    filter: blur(0.5px);
}

/* ===== АДАПТИВНОСТЬ (общее) ===== */
@media (max-width: 968px) {
    nav { display: none; }
    #burger { display: flex; }
    main { padding-top: 32px; }
    #buildsburger, #edvardtoolsburger, #supportburger { display: flex; }
    .row { flex-direction: column; width: 100%; }
}
@media (max-width: 768px) {
    .snowflake-toggle { bottom: 15px; left: 15px; }
    #snowToggle { width: 52px; height: 52px; font-size: 18px; }
}
@media (max-width: 440px) {
    .footer-code { display: none; }
    #burger::before { display: none; }
}
@media (min-width: 2440px) {
    main { max-width: 2000px; }
}

/* ===== ВСПОМОГАТЕЛЬНЫЕ ===== */
.slider-container, .accordition-container { max-width: 2400px; margin: 0 auto; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

/* ============================================================
   СТРАНИЦА 404
   ============================================================ */
.error-main {
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}
.error-simple {
    text-align: center;
    max-width: 600px;
    width: 100%;
    animation: fadeIn 0.5s ease-out;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.error-code {
    font-family: var(--font-mono);
    font-size: clamp(4rem, 12vw, 6.5rem);
    font-weight: 700;
    color: var(--primary);
    letter-spacing: -0.04em;
    margin-bottom: 20px;
}
.error-code::before { content: "// "; color: var(--text-dim); font-weight: 400; }
.error-simple h1 {
    font-size: 1.8rem;
    margin-bottom: 14px;
    color: var(--text);
}
.error-simple p {
    font-size: 1rem;
    color: var(--text-dim);
    margin-bottom: 30px;
    line-height: 1.65;
}
.error-buttons { margin-bottom: 28px; }
.btn-home {
    display: inline-block;
    font-family: var(--font-mono);
    padding: 13px 28px;
    background: var(--primary);
    color: #fff;
    text-decoration: none;
    border-radius: 12px;
    font-size: 0.95rem;
    transition: all 0.3s;
    border: none;
    box-shadow: 0 8px 24px rgba(255, 7, 58, 0.25);
}
.btn-home:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 34px rgba(255, 7, 58, 0.4);
}
.quick-links {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 22px;
    text-align: left;
}
.quick-links p {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-dim);
    margin-bottom: 14px;
}
.quick-links p::before { content: "// "; color: var(--primary); }
.quick-links a {
    display: inline-block;
    margin: 0 6px 8px 0;
    padding: 7px 14px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
    text-decoration: none;
    border-radius: 999px;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    border: 1px solid var(--border);
    transition: all 0.25s;
}
.quick-links a:hover {
    background: var(--primary-soft);
    border-color: var(--primary-border);
    color: var(--primary);
    transform: translateY(-2px);
}

/* ============================================================
   СТРАНИЦА WINDOWS ISO
   ============================================================ */
.page-header {
    text-align: center;
    padding: 32px 20px 40px;
}
.page-header h1 { font-size: clamp(1.8rem, 4vw, 2.4rem); margin-bottom: 10px; }
.page-header h1::before {
    content: "// ";
    font-family: var(--font-mono);
    color: var(--primary);
    font-weight: 400;
}
.page-header p { color: var(--text-dim); font-size: 1rem; }

.os-section { margin-bottom: 48px; }
.os-section h2 {
    font-size: 1.4rem;
    margin-bottom: 22px;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 10px;
}
.os-section h2::before {
    content: '';
    width: 4px; height: 22px;
    background: var(--primary);
    border-radius: 2px;
}
.iso-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}
.iso-card {
    background: var(--surface);
    border-radius: var(--radius-md);
    padding: 24px;
    border: 1px solid var(--border);
    transition: all 0.3s;
}
.iso-card:hover {
    border-color: var(--primary-border);
    transform: translateY(-4px);
    background: var(--surface-strong);
}
.iso-card h3 { font-size: 1.15rem; margin-bottom: 18px; }
.iso-info { margin-bottom: 22px; }
.iso-info p {
    display: flex;
    justify-content: space-between;
    margin: 8px 0;
    color: var(--text-dim);
    font-size: 0.92rem;
}
.iso-info strong {
    font-family: var(--font-mono);
    font-weight: 500;
    color: var(--text);
    font-size: 0.85rem;
}
.download-btn {
    display: block;
    font-family: var(--font-mono);
    padding: 13px;
    background: var(--primary);
    color: white;
    text-decoration: none;
    border-radius: 10px;
    text-align: center;
    font-size: 0.9rem;
    transition: all 0.3s;
    border: none;
}
.download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 26px rgba(255, 7, 58, 0.35);
}

/* ============================================================
   СТРАНИЦА ИГР
   ============================================================ */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
    padding: 10px 0;
}
.game-card {
    background: var(--surface);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    overflow: hidden;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
}
.game-card:hover {
    border-color: var(--primary-border);
    transform: translateY(-6px);
    background: var(--surface-strong);
}
.game-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    position: relative;
    background: #0d0d11;
}
.game-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.game-card:hover .game-image img { transform: scale(1.05); }
.coming-soon .game-image {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, #0d0d11, #111116);
}
.coming-soon-overlay {
    font-family: var(--font-mono);
    color: var(--primary);
    font-size: 1.1rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}
.coming-soon-overlay::before { content: "> "; }
.game-content {
    padding: 22px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}
.game-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
}
.game-header h3 { font-size: 1.2rem; margin: 0; }
.game-badge {
    font-family: var(--font-mono);
    padding: 4px 10px;
    border-radius: 99px;
    font-size: 0.68rem;
    font-weight: 500;
    text-transform: lowercase;
    white-space: nowrap;
}
.game-badge.online {
    background: rgba(34, 197, 94, 0.12);
    color: var(--syn-ok);
    border: 1px solid rgba(34, 197, 94, 0.35);
}
.game-badge.online::before { content: "● "; }
.game-badge.download {
    background: var(--primary-soft);
    color: var(--primary);
    border: 1px solid var(--primary-border);
}
.game-badge.soon {
    background: rgba(245, 158, 11, 0.12);
    color: var(--syn-warn);
    border: 1px solid rgba(245, 158, 11, 0.35);
}
.game-description {
    color: var(--text-dim);
    line-height: 1.6;
    font-size: 0.92rem;
    margin-bottom: 18px;
    flex-grow: 1;
}
.game-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 10px;
    margin-bottom: 20px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--border);
}
.meta-item { font-size: 0.82rem; color: var(--text-dim); }
.meta-item strong {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    display: block;
    margin-bottom: 3px;
}
.game-btn {
    display: block;
    font-family: var(--font-mono);
    padding: 13px;
    border-radius: 10px;
    text-decoration: none;
    text-align: center;
    font-size: 0.9rem;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
}
.game-btn.play {
    background: rgba(34, 197, 94, 0.14);
    color: var(--syn-ok);
    border: 1px solid rgba(34, 197, 94, 0.4);
}
.game-btn.play:hover {
    background: rgba(34, 197, 94, 0.22);
    transform: translateY(-2px);
}
.game-btn.download {
    background: var(--primary);
    color: white;
}
.game-btn.download:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 26px rgba(255, 7, 58, 0.35);
}
.game-btn.disabled {
    background: rgba(128, 128, 128, 0.15);
    color: rgba(255, 255, 255, 0.4);
    cursor: not-allowed;
}
.game-btn.disabled:hover { transform: none; box-shadow: none; }

/* адаптивность для игр/виндовс */
@media (max-width: 1024px) {
    .games-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
}
@media (max-width: 768px) {
    .games-grid { grid-template-columns: 1fr; }
    .iso-grid { grid-template-columns: 1fr; }
    .game-image { height: 180px; }
}
@media (max-width: 480px) {
    .game-meta { grid-template-columns: 1fr; }
    .game-header { flex-direction: column; }
    .game-badge { align-self: flex-start; }
}