:root {
    --bg: #08080a;
    --accent-1: #4facfe; /* Голубой */
    --accent-2: #00f2fe; /* Бирюза */
    --accent-3: #7000ff; /* Фиолетовый */
    --glass-bg: rgba(255, 255, 255, 0.02);
    --glass-border: rgba(255, 255, 255, 0.07);
    --font: 'Plus Jakarta Sans', 'Inter', system-ui, sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font);
}

body {
    background-color: var(--bg);
    color: #fff;
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
}

::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: var(--bg);
}
::-webkit-scrollbar-thumb {
    background: linear-gradient(var(--accent-1), var(--accent-3));
    border-radius: 10px;
}

.noise-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('https://grainy-gradients.vercel.app/noise.svg');
    opacity: 0.12;
    pointer-events: none;
    z-index: 10;
}

.aurora-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    filter: blur(120px);
}

.blob {
    position: absolute;
    border-radius: 50%;
    opacity: 0.4;
    animation: breathe 12s infinite alternate ease-in-out;
}

.blob-1 {
    width: 600px;
    height: 600px;
    background: var(--accent-1);
    top: -10%;
    left: -10%;
}

.blob-2 {
    width: 700px;
    height: 700px;
    background: var(--accent-3);
    bottom: -10%;
    right: -10%;
    animation-delay: -4s;
}

.blob-3 {
    width: 400px;
    height: 400px;
    background: var(--accent-2);
    top: 30%;
    left: 20%;
    animation-delay: -8s;
}

@keyframes breathe {
    0% { transform: scale(1) translate(0, 0); opacity: 0.3; }
    50% { transform: scale(1.2) translate(50px, 80px); opacity: 0.5; }
    100% { transform: scale(0.9) translate(-20px, 40px); opacity: 0.3; }
}

.cursor-glow {
    position: fixed;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(79, 172, 254, 0.12) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s;
}

.wrapper {
    position: relative;
    z-index: 2;
    max-width: 1100px;
    width: 100%;
    margin: 0 auto;
    padding: 100px 20px;
}

.glass-header {
    text-align: center;
    margin-bottom: 80px;
}

.title {
    font-size: clamp(3rem, 10vw, 6rem);
    font-weight: 800;
    letter-spacing: -3px;
    background: linear-gradient(to bottom, #fff 50%, rgba(255,255,255,0.2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 20px;
}

.badge-container {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.status-tag {
    display: inline-block;
    padding: 8px 18px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 100px;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--accent-2);
    backdrop-filter: blur(10px);
}

.grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 24px;
}

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid var(--glass-border);
    border-radius: 40px;
    padding: 50px;
    position: relative;
    overflow: hidden;
    transition: 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.glass-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-10px);
}

.step {
    font-size: 0.75rem;
    color: var(--accent-1);
    font-weight: 800;
    display: block;
    margin-bottom: 25px;
    letter-spacing: 2px;
}

.glass-card h2 {
    font-size: 2.2rem;
    margin-bottom: 20px;
    font-weight: 700;
}

.pills {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.pills span {
    background: rgba(255, 255, 255, 0.04);
    padding: 10px 20px;
    border-radius: 14px;
    font-size: 0.85rem;
    border: 1px solid var(--glass-border);
    transition: 0.3s;
}

.pills span:hover {
    background: var(--accent-3);
    border-color: var(--accent-3);
}

.stats {
    display: flex;
    justify-content: space-around;
    align-items: center;
}

.stat-item {
    text-align: center;
}

.stat-num {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--accent-2);
    display: inline-block;
}

.stat-plus {
    font-size: 1.5rem;
    color: var(--accent-1);
    font-weight: 800;
}

.project-featured {
    grid-column: span 2;
    background: linear-gradient(135deg, rgba(79, 172, 254, 0.03), rgba(112, 0, 255, 0.03));
}

.btn-group {
    display: flex;
    gap: 15px;
    margin-top: 35px;
}

.glass-btn {
    display: inline-block;
    padding: 16px 35px;
    background: #fff;
    color: #000;
    text-decoration: none;
    border-radius: 18px;
    font-weight: 700;
    transition: 0.3s ease;
}

.glass-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 15px 30px rgba(255, 255, 255, 0.2);
}

.secondary-btn {
    display: inline-block;
    padding: 16px 35px;
    border: 1px solid var(--glass-border);
    color: #fff;
    text-decoration: none;
    border-radius: 18px;
    font-weight: 600;
    transition: 0.3s;
}

.secondary-btn:hover {
    background: rgba(255, 255, 255, 0.05);
}

.scroll-reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: 1.2s cubic-bezier(0.17, 0.67, 0.83, 0.67);
}

.scroll-reveal.active {
    opacity: 1;
    transform: translateY(0);
}

footer {
    margin-top: 100px;
    text-align: center;
    padding-bottom: 50px;
}

.footer-text {
    color: #555;
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.socials a {
    color: #888;
    text-decoration: none;
    margin: 0 15px;
    font-weight: 500;
    transition: 0.3s;
}

.socials a:hover {
    color: var(--accent-1);
}

@media (max-width: 850px) {
    .grid {
        grid-template-columns: 1fr;
    }
    .project-featured {
        grid-column: span 1;
    }
    .wrapper {
        padding: 60px 20px;
    }
}
.terminal-window {
    background: rgba(0, 0, 0, 0.4);
    border-radius: 12px;
    padding: 15px;
    height: 180px;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    overflow: hidden;
    border: 1px solid var(--glass-border);
}

.terminal-header {
    display: flex;
    gap: 6px;
    margin-bottom: 15px;
}

.dot { width: 10px; height: 10px; border-radius: 50%; }
.red { background: #ff5f56; }
.yellow { background: #ffbd2e; }
.green { background: #27c93f; }

.log-line {
    color: var(--accent-2);
    margin-bottom: 5px;
    opacity: 0;
    animation: fadeInLog 0.5s forwards;
}

@keyframes fadeInLog {
    from { opacity: 0; transform: translateX(-10px); }
    to { opacity: 1; transform: translateX(0); }
}

.cde-preview {
    position: relative;
    width: 100%;
    height: 300px; /* Установи фиксированную высоту */
    border-radius: 20px;
    overflow: hidden; /* Это обрежет всё, что выходит за границы */
    margin-top: 25px;
    border: 1px solid var(--glass-border);
}

/* Улучшенные стили для превью CDE */
.cde-preview {
    position: relative;
    width: 100%;
    max-width: 100%; /* Гарантируем, что не выйдет за границы карточки */
    height: 350px;   /* Фиксированная высота для стабильности на мобилках и десктопе */
    border-radius: 24px;
    overflow: hidden;
    margin-top: 25px;
    border: 1px solid var(--glass-border);
    background: #000; /* Черный фон на случай долгой загрузки картинки */
}

.cde-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;    /* Картинка заполняет блок без искажений */
    object-position: top center; /* Приоритет на верхнюю часть (меню редактора) */
    display: block;
    filter: brightness(0.7) blur(1px); /* Делаем чуть темнее для читаемости текста */
    transition: all 0.5s ease;
}

.cde-preview:hover img {
    filter: brightness(1) blur(0);
    transform: scale(1.02); /* Легкий зум при наведении */
}

.coming-soon-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.4);
    color: #fff;
    font-size: clamp(1.2rem, 4vw, 2rem);
    font-weight: 800;
    letter-spacing: 4px;
    text-shadow: 0 4px 15px rgba(0,0,0,0.5);
    z-index: 2;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.cde-preview:hover .coming-soon-overlay {
    opacity: 0;
}

.secondary-btn[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
    background: rgba(255, 255, 255, 0.02);
    border-color: rgba(255, 255, 255, 0.05);
    color: #999;
}

.secondary-btn[disabled]:hover {
    transform: none;
    box-shadow: none;
    background: rgba(255, 255, 255, 0.02);
}