:root {
    --bg-color: #050505;
    --text-color: #ffffff;
    --text-muted: #a5a5a5;
    --text-dim: #bbb;
    
    --accent-1: #6a11cb;
    --accent-2: #2575fc;
    --accent-green: #00ff88;
    --accent-pink: #ff0055;
    
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.05);
    
    --card-bg: rgba(255, 255, 255, 0.03);
    --card-border: rgba(255, 255, 255, 0.08); /* for news cards */
    --card-border-hover: rgba(255, 255, 255, 0.15);
    
    --logo-grad-1: #ffffff;
    --logo-grad-2: #a5a5a5;
    --logo-glow: none;
    
    --orbit-bg: #0d0d0d;
    --orbit-border: rgba(255, 255, 255, 0.1);
    
    --box-shadow-main: rgba(0, 0, 0, 0.5);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    min-height: 100vh;
    overflow: hidden;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Base background effects */
.background-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
}

.blob {
    position: absolute;
    filter: blur(100px);
    border-radius: 50%;
    opacity: 0.6;
    animation: float 20s infinite ease-in-out alternate;
    transition: transform 0.5s ease-out;
}

.blob-1 {
    top: -10%;
    left: -10%;
    width: 50vw;
    height: 50vw;
    background: radial-gradient(circle, var(--accent-1), transparent 60%);
    animation-delay: -5s;
}

.blob-2 {
    bottom: -20%;
    right: -10%;
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, var(--accent-2), transparent 60%);
}

.noise-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,%3Csvg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"%3E%3Cfilter id="noiseFilter"%3E%3CfeTurbulence type="fractalNoise" baseFrequency="0.65" numOctaves="3" stitchTiles="stitch"/%3E%3C/filter%3E%3Crect width="100%25" height="100%25" filter="url(%23noiseFilter)"/%3E%3C/svg%3E');
    opacity: 0.03;
    pointer-events: none;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(10%, 10%) scale(1.1); }
}

/* Glass panel */
.content-wrapper {
    z-index: 1;
    padding: 20px;
}

.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 3rem 4rem;
    text-align: center;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    transform: translateY(30px);
    opacity: 0;
    animation: fadeUp 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fadeUp {
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Text styles */
h1 {
    font-size: 4rem;
    font-weight: 800;
    letter-spacing: -2px;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--logo-grad-1), var(--logo-grad-2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    position: relative;
    filter: var(--logo-glow);
}

/* Glitch effect for hover */
.glitch {
    position: relative;
    cursor: default;
}

.glitch::before, .glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-color);
    -webkit-background-clip: text;
    opacity: 0;
    pointer-events: none;
}

.glitch:hover::before {
    left: 2px;
    text-shadow: -1px 0 rgba(255, 0, 85, 0.5);
    animation: glitch-anim-1 2s infinite linear alternate-reverse;
    opacity: 1;
}

.glitch:hover::after {
    left: -2px;
    text-shadow: -1px 0 rgba(0, 255, 255, 0.5);
    animation: glitch-anim-2 3s infinite linear alternate-reverse;
    opacity: 1;
}

.subtitle {
    font-size: 1.2rem;
    font-weight: 300;
    color: #a5a5a5;
    margin-bottom: 2rem;
    letter-spacing: 1px;
}

/* Status indicator */
.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--card-bg);
    padding: 6px 16px;
    border-radius: 50px;
    margin-bottom: 3rem;
    border: 1px solid var(--card-border);
}

.status-dot {
    width: 8px;
    height: 8px;
    background-color: #00ff88;
    border-radius: 50%;
    box-shadow: 0 0 10px #00ff88, 0 0 20px #00ff88;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(0, 255, 136, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(0, 255, 136, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(0, 255, 136, 0); }
}

.status-text {
    font-size: 0.85rem;
    color: var(--text-dim);
    font-weight: 400;
}

/* Button */
.cta-button {
    display: inline-block;
    padding: 12px 32px;
    background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
    color: white;
    text-decoration: none;
    border-radius: 100px;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 10px 20px -10px rgba(106, 17, 203, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.2);
    user-select: none;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 25px -10px rgba(37, 117, 252, 0.6);
    filter: brightness(1.1);
}

.cta-button:active {
    transform: translateY(1px);
}

.close-tab {
    background: var(--card-bg) !important;
    border: 1px solid var(--card-border) !important;
    color: var(--text-color) !important;
    box-shadow: none !important;
}
.close-tab:hover {
    background: var(--card-border-hover) !important;
    color: var(--text-color) !important;
    box-shadow: none !important;
}

@keyframes glitch-anim-1 {
    0% { clip: rect(20px, 9999px, 85px, 0); }
    20% { clip: rect(10px, 9999px, 92px, 0); }
    40% { clip: rect(61px, 9999px, 83px, 0); }
    60% { clip: rect(31px, 9999px, 20px, 0); }
    80% { clip: rect(6px, 9999px, 97px, 0); }
    100% { clip: rect(4px, 9999px, 12px, 0); }
}

@keyframes glitch-anim-2 {
    0% { clip: rect(10px, 9999px, 85px, 0); }
    20% { clip: rect(90px, 9999px, 92px, 0); }
    40% { clip: rect(12px, 9999px, 83px, 0); }
    60% { clip: rect(41px, 9999px, 20px, 0); }
    80% { clip: rect(2px, 9999px, 97px, 0); }
    100% { clip: rect(35px, 9999px, 12px, 0); }
}

@media (max-width: 600px) {
    .glass-panel { padding: 2rem; }
    h1 { font-size: 2.5rem; }
    .subtitle { font-size: 1rem; }
}

/* News container & cards */
.news-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    max-height: 55vh;
    overflow-y: auto;
    padding-right: 15px;
    margin-top: 1rem;
    text-align: left;
}

/* Custom scrollbar for news */
.news-container::-webkit-scrollbar {
    width: 6px;
}
.news-container::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}
.news-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
}
.news-container::-webkit-scrollbar-thumb:hover {
    background: var(--accent-1);
}

.news-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.news-card:hover {
    background: var(--card-bg);
    border-color: var(--card-border-hover);
    transform: translateX(5px);
}

.news-date {
    font-size: 0.85rem;
    color: var(--accent-2);
    margin-bottom: 0.5rem;
    display: block;
    font-weight: 600;
}

.news-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 0.8rem;
    color: #fff;
}

.news-text {
    font-size: 0.95rem;
    color: var(--text-dim);
    line-height: 1.5;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #a5a5a5;
    text-decoration: none;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    transition: color 0.3s ease;
}

.back-link:hover {
    color: #fff;
}

.nav-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1rem;
}

/* --- ELECTRO CIRCLE LAYOUT --- */
.electro-wrapper {
    position: relative;
    width: 480px;
    height: 480px;
    margin: 40px auto;
}

.electro-circle {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    border-radius: 50%;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
    box-shadow: 0 10px 40px var(--box-shadow-main);
    z-index: 5;
}

.electric-border-wrap {
    position: absolute;
    inset: -4px;
    border-radius: inherit;
    padding: 4px;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    overflow: hidden;
    pointer-events: none;
    z-index: -1;
}

.electric-border-wrap::before {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    width: 200vw; height: 200vw;
    transform: translate(-50%, -50%);
    background: conic-gradient(from 0deg, 
        transparent 0deg, 
        var(--accent-2) 60deg, 
        #ffffff 80deg, 
        transparent 85deg, 
        transparent 180deg, 
        var(--accent-1) 240deg, 
        #00ff88 260deg, 
        transparent 265deg, 
        transparent 360deg);
    animation: rotate-electric 3s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

.electro-circle::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    box-shadow: 0 0 30px rgba(37, 117, 252, 0.1), inset 0 0 30px rgba(106, 17, 203, 0.2);
    animation: pulse-glow 2s ease-in-out infinite alternate;
    pointer-events: none;
}

@keyframes rotate-electric {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes pulse-glow {
    from { box-shadow: 0 0 20px rgba(37, 117, 252, 0.1), inset 0 0 20px rgba(106, 17, 203, 0.1); }
    to { box-shadow: 0 0 50px rgba(0, 255, 136, 0.3), inset 0 0 50px rgba(37, 117, 252, 0.4); }
}

.orbit-wrap {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    z-index: 20;
    animation: chaotic-float 4s ease-in-out infinite alternate;
    transition: opacity 0.4s ease;
}

/* Individual chaotic float speeds */
.orbit-wrap-projects { animation-duration: 3.5s; animation-name: chaotic-float-1; transform: rotate(0deg) translateX(250px) rotate(0deg); }
.orbit-wrap-news     { animation-duration: 4.2s; animation-name: chaotic-float-2; transform: rotate(60deg) translateX(250px) rotate(-60deg); }
.orbit-wrap-team     { animation-duration: 4.5s; animation-name: chaotic-float-1; transform: rotate(120deg) translateX(250px) rotate(-120deg); }
.orbit-wrap-support  { animation-duration: 3.8s; animation-name: chaotic-float-3; transform: rotate(180deg) translateX(250px) rotate(-180deg); }
.orbit-wrap-features { animation-duration: 3.2s; animation-name: chaotic-float-2; transform: rotate(240deg) translateX(250px) rotate(-240deg); }
.orbit-wrap-about    { animation-duration: 4.0s; animation-name: chaotic-float-3; transform: rotate(300deg) translateX(250px) rotate(-300deg); }

/* Support specific hover color */
.orbit-wrap-support .orbit-item:hover {
    border-color: var(--accent-pink);
    box-shadow: 0 0 25px rgba(255, 0, 85, 0.5);
}
.orbit-wrap-support .orbit-item:hover .orbit-glow-wrap::before {
    background: conic-gradient(from 0deg, transparent, var(--accent-pink), #ff6b9d, transparent);
}


@keyframes chaotic-float-1 {
    0% { margin-top: 0; margin-left: 0; }
    100% { margin-top: -10px; margin-left: 10px; }
}
@keyframes chaotic-float-2 {
    0% { margin-top: 0; margin-left: 0; }
    100% { margin-top: 12px; margin-left: -8px; }
}
@keyframes chaotic-float-3 {
    0% { margin-top: 0; margin-left: 0; }
    100% { margin-top: 8px; margin-left: 15px; }
}

.orbit-item {
    position: absolute;
    top: -30px;
    left: -30px;
    width: 60px;
    height: 60px;
    border-radius: 30px;
    background: var(--orbit-bg);
    border: 2px solid var(--orbit-border);
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
    box-shadow: 0 0 15px rgba(0,0,0,0.5);
}

.orbit-glow-wrap {
    position: absolute;
    inset: -2px;
    border-radius: 30px;
    padding: 2px;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    opacity: 0.6;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.orbit-glow-wrap::before {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    width: 300px; height: 300px;
    background: conic-gradient(from 0deg, transparent, var(--accent-1), transparent);
    transform: translate(-50%, -50%) rotate(0deg);
    animation: rotate-electric-orbit-new 1.5s linear infinite;
}

@keyframes rotate-electric-orbit-new {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

.orbit-item:hover {
    width: 160px;
    left: -80px; /* Expands visually around the wrapper origin */
    background: var(--glass-bg);
    border-color: var(--accent-2);
    box-shadow: 0 0 25px rgba(37, 117, 252, 0.5);
}

.orbit-item:hover .orbit-glow-wrap {
    opacity: 1;
}
.orbit-item:hover .orbit-glow-wrap::before {
    background: conic-gradient(from 0deg, transparent, var(--accent-2), #00ff88, transparent);
}

.orbit-icon {
    font-size: 1.5rem;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    justify-content: center;
    align-items: center;
}

.orbit-text {
    font-size: 1.1rem;
    font-weight: 600;
    opacity: 0;
    position: absolute;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform: scale(0.5);
}

.orbit-item:hover .orbit-icon {
    opacity: 0;
    transform: scale(0.5) translateY(20px);
}

.orbit-item:hover .orbit-text {
    opacity: 1;
    transform: scale(1) translateY(0);
}

/* --- MORPHING RECT STATE --- */
.electro-wrapper {
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.electro-wrapper.state-rect {
    width: 900px;
    height: 60vh;
    min-height: 500px;
    max-height: 700px;
}

/* ── Внешние слоты заголовка и футера (десктоп) ──────────────────────────── */
.tab-ext-header,
.tab-ext-footer {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease 0.1s;
    z-index: 25;
}

.tab-ext-header {
    top: -54px;
    left: 0; right: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.tab-ext-title {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text-color);
    letter-spacing: -0.5px;
    font-family: 'Outfit', sans-serif;
}

.tab-ext-back {
    background: var(--card-bg) !important;
    border: 1px solid var(--card-border) !important;
    color: var(--text-color) !important;
    box-shadow: none !important;
    white-space: nowrap;
    padding: 8px 20px !important;
    font-size: 0.95rem !important;
}
.tab-ext-back:hover {
    background: var(--card-border-hover) !important;
}

.tab-ext-footer {
    bottom: -54px;
    right: 0;
    display: flex;
    justify-content: flex-end;
}

/* Показать слоты когда карточка раскрыта */
.electro-wrapper.state-rect .tab-ext-header,
.electro-wrapper.state-rect .tab-ext-footer {
    opacity: 1;
    pointer-events: auto;
}

/* Скрыть внутренние h2 и кнопки на десктопе */
.electro-wrapper.state-rect .tab-content > h2 { display: none; }
.tab-mobile-actions { display: none; }

/* ── Терминал "О проекте" ────────────────────────────────────────────────── */
.term-window {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    border-radius: 12px;
    border: 1px solid rgba(0, 255, 136, 0.2);
    background: rgba(0, 0, 0, 0.85);
    overflow: hidden;
    box-shadow: 0 0 50px rgba(0, 255, 136, 0.06);
    font-family: 'Courier New', Courier, monospace;
    margin-bottom: 0;
}
.term-topbar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 14px;
    background: rgba(255,255,255,0.04);
    border-bottom: 1px solid rgba(255,255,255,0.07);
    flex-shrink: 0;
}
.term-dot { width: 11px; height: 11px; border-radius: 50%; flex-shrink: 0; }
.td-red    { background: #ff5f57; }
.td-yellow { background: #febc2e; }
.td-green  { background: #28c840; }
.term-name { margin-left: 8px; font-size: 0.72rem; color: var(--text-muted); }
.term-body {
    flex: 1;
    overflow-y: auto;
    padding: 14px 20px 14px;
    display: flex;
    flex-direction: column;
    gap: 1px;
    scrollbar-width: thin;
    scrollbar-color: rgba(0,255,136,0.2) transparent;
}
.term-line {
    font-size: 0.84rem;
    line-height: 1.7;
    white-space: pre-wrap;
    animation: term-fadein 0.15s ease;
}
@keyframes term-fadein { from { opacity: 0; } to { opacity: 1; } }
.term-cmd    { color: #a8ff78; }
.term-check  { color: #6ee7b7; }
.term-accent { color: #00ff88; font-weight: 700; letter-spacing: 0.3px; }
.term-text   { color: #e2e8f0; }
.term-dim    { color: var(--text-muted); padding-left: 1.2em; }
.term-status { color: #febc2e; }
.term-gap    { height: 6px; }
.term-cursor {
    display: inline-block;
    width: 9px;
    height: 0.85em;
    background: #00ff88;
    vertical-align: text-bottom;
    margin-left: 1px;
    animation: blink-cursor 1s step-end infinite;
}
.term-cursor.done { opacity: 0; animation: none; }
@keyframes blink-cursor { 0%,100%{opacity:1} 50%{opacity:0} }

/* Мобайл: уменьшить высоту терминала */
@media (max-width: 950px) {
    .term-window { min-height: 220px; }
    .term-line { font-size: 0.78rem; }
}

/* ── Bento Grid (Манифест) ───────────────────────────────────────────────── */
.bento-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 10px;
    flex: 1;
    min-height: 0;
}
.bento-card {
    border-radius: 16px;
    border: 1px solid var(--card-border);
    background: var(--card-bg);
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    cursor: pointer;
}
.bento-card:hover { transform: translateY(-2px); }
.bento-card.bento-tall { grid-row: span 2; }

/* Скрытый доп.текст — раскрывается по клику */
.bento-extra {
    font-size: 0.75rem;
    color: var(--text-dim);
    line-height: 1.5;
    margin: 6px 0 0;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.4s ease, opacity 0.3s ease;
}
.bento-card.active .bento-extra {
    max-height: 80px;
    opacity: 1;
}
.bento-card.bento-tall.active .bento-extra { max-height: 120px; }

/* Active state: подсветка карточки */
.bento-card.active.bento-blue  { background: rgba(37,117,252,0.08);  border-color: rgba(37,117,252,0.6); }
.bento-card.active.bento-purple{ background: rgba(106,17,203,0.08);  border-color: rgba(106,17,203,0.6); }
.bento-card.active.bento-dark  { background: rgba(255,255,255,0.04); border-color: rgba(255,255,255,0.2); }
.bento-card.active.bento-green { background: rgba(0,255,136,0.06);   border-color: rgba(0,255,136,0.6); }
.bento-card.active.bento-pink  { background: rgba(255,107,157,0.06); border-color: rgba(255,107,157,0.6); }


/* Цветные акценты */
.bento-blue  { border-color: rgba(37,117,252,0.35); }
.bento-blue:hover  { border-color: rgba(37,117,252,0.7); box-shadow: 0 0 28px rgba(37,117,252,0.18); }
.bento-purple{ border-color: rgba(106,17,203,0.4); }
.bento-purple:hover{ border-color: rgba(106,17,203,0.7); box-shadow: 0 0 28px rgba(106,17,203,0.18); }
.bento-dark  { border-color: rgba(255,255,255,0.06); }
.bento-dark:hover  { border-color: rgba(255,255,255,0.15); box-shadow: 0 0 28px rgba(255,255,255,0.05); }
.bento-green { border-color: rgba(0,255,136,0.3); }
.bento-green:hover { border-color: rgba(0,255,136,0.6); box-shadow: 0 0 28px rgba(0,255,136,0.15); }
.bento-pink  { border-color: rgba(255,107,157,0.3); }
.bento-pink:hover  { border-color: rgba(255,107,157,0.6); box-shadow: 0 0 28px rgba(255,107,157,0.15); }

/* Водяной знак-эмодзи (большой, фоновый) */
.bento-watermark {
    position: absolute;
    top: -10px; right: -10px;
    font-size: 7rem;
    opacity: 0.06;
    line-height: 1;
    user-select: none;
    pointer-events: none;
}

/* Контент внутри карточки — всегда внизу */
.bento-body {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.bento-emoji {
    font-size: 1.6rem;
    line-height: 1;
    margin-bottom: 4px;
}
.bento-card.bento-tall .bento-emoji { font-size: 2.2rem; }
.bento-title {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--text-color);
    margin: 0;
    letter-spacing: -0.2px;
}
.bento-card.bento-tall .bento-title { font-size: 1.3rem; }
.bento-desc {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.4;
}
.bento-card.bento-tall .bento-desc { font-size: 0.88rem; color: var(--text-dim); }

/* Мобайл: bento в вертикальный список */
@media (max-width: 950px) {
    .bento-grid {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto;
        flex: none;
        margin-bottom: 1rem;
    }
    .bento-card.bento-tall { grid-row: span 1; }
    .bento-card { min-height: 110px; }
    .bento-body { position: relative; padding: 14px; }
}

/* ── Team cards ──────────────────────────────────────────────────────────── */

.team-cards {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 1.5rem;
    overflow-y: auto;
    max-height: calc(100% - 60px);
}
.team-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 14px;
    overflow: hidden;
    cursor: pointer;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    flex-shrink: 0;
}
.team-card:hover { border-color: rgba(255,255,255,0.15); }
.team-card.expanded {
    border-color: rgba(37, 117, 252, 0.45);
    box-shadow: 0 0 24px rgba(37, 117, 252, 0.1);
}
.team-card-preview {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
}
.team-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--card-border);
    flex-shrink: 0;
}
.team-info { flex: 1; display: flex; flex-direction: column; gap: 3px; }
.team-name  { font-size: 1rem; font-weight: 700; color: var(--text-color); margin: 0; }
.team-role  { font-size: 0.78rem; color: var(--accent-2); font-weight: 600; }
.team-short { font-size: 0.82rem; color: var(--text-muted); margin: 4px 0 0; line-height: 1.3; }
.team-expand-icon {
    font-size: 1.5rem;
    color: var(--text-muted);
    transition: transform 0.3s ease;
    flex-shrink: 0;
    line-height: 1;
    user-select: none;
}
.team-card.expanded .team-expand-icon { transform: rotate(90deg); }
.team-card-detail {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.3s ease;
    padding: 0 16px;
    border-top: 0px solid var(--card-border);
}
.team-card.expanded .team-card-detail {
    max-height: 180px;
    padding: 12px 16px 16px;
    border-top-width: 1px;
}
.team-card-detail p {
    color: var(--text-dim);
    font-size: 0.88rem;
    line-height: 1.6;
    margin: 0;
}


/* Мобильная версия (≤950px): внешние слоты скрыты, внутренние показаны */
@media (max-width: 950px) {
    .tab-ext-header, .tab-ext-footer { display: none !important; }
    .electro-wrapper.state-rect .tab-content > h2 { display: block; }
    .tab-mobile-actions { display: flex; gap: 15px; margin-top: auto; padding-top: 1rem; }
}

/* Base shape morphing transitions */
.electro-circle, .electro-circle::after {
    transition: border-radius 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.electric-border-wrap {
    transition: border-radius 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.electro-wrapper.state-rect .electro-circle {
    border-radius: 24px;
    align-items: flex-start;
    justify-content: flex-start;
}

/* Hide wraps when in rect state */
.electro-wrapper.state-rect .orbit-wrap {
    opacity: 0;
    pointer-events: none;
}
.electro-wrapper.state-rect .orbit-item {
    transform: scale(0);
}

/* Tab content logic */
.circle-content-main {
    transition: opacity 0.4s ease;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.electro-wrapper.state-rect .circle-content-main {
    position: absolute; 
    pointer-events: none;
}

.tab-content {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    padding: 3rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
    display: flex;
    flex-direction: column;
    text-align: left;
    overflow-y: auto;
    z-index: 10;
}

.tab-content.active {
    opacity: 1;
    pointer-events: auto;
}

/* Custom scrollbar for active tabs */
.tab-content::-webkit-scrollbar { width: 6px; }
.tab-content::-webkit-scrollbar-track { background: var(--glass-bg); border-radius: 10px; }
.tab-content::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 10px; }
.tab-content::-webkit-scrollbar-thumb:hover { background: var(--accent-1); }

@media (max-width: 950px) {
    .electro-wrapper.state-rect {
        width: 90vw;
        height: 80vh;
    }
    .tab-content { padding: 2rem; }
}

@media (max-width: 700px) {
    .electro-wrapper { width: 300px; height: 300px; }
    .orbit-wrap-projects { transform: rotate(0deg) translateX(170px) rotate(0deg); }
    .orbit-wrap-news     { transform: rotate(72deg) translateX(170px) rotate(-72deg); }
    .orbit-wrap-team     { transform: rotate(144deg) translateX(170px) rotate(-144deg); }
    .orbit-wrap-features { transform: rotate(216deg) translateX(170px) rotate(-216deg); }
    .orbit-wrap-about    { transform: rotate(288deg) translateX(170px) rotate(-288deg); }
    .circle-content-main h1 { font-size: 2.2rem !important; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   HERO CARDS (Команда)
   ═══════════════════════════════════════════════════════════════════════════ */

.hero-cards-deck {
    display: flex;
    flex-direction: row;
    gap: 28px;
    justify-content: center;
    align-items: flex-start;
    flex-wrap: wrap;
    padding: 0 0 2rem 0;
}

/* Контейнер карточки — задаёт перспективу flip */
.hero-card {
    width: 220px;
    height: 380px;
    cursor: pointer;
    perspective: 1000px;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.hero-card:hover {
    transform: translateY(-8px);
}

.hero-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform 0.65s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 16px;
}

/* Переворот */
.hero-card.flipped .hero-card-inner {
    transform: rotateY(180deg);
}

/* Общее для обеих сторон */
.hero-card-front,
.hero-card-back {
    position: absolute;
    inset: 0;
    border-radius: 16px;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    overflow: hidden;
}

/* ── Лицевая сторона ── */
.hero-card-front {
    background: linear-gradient(165deg, #0d1220, #131928);
    border: 1px solid rgba(255,255,255,0.08);
    display: flex;
    flex-direction: column;
}

/* Бейдж редкости (SENIOR / JUNIOR / AI) */
.hero-card-rarity {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 0.55rem;
    font-weight: 800;
    letter-spacing: 3px;
    padding: 3px 8px;
    border-radius: 4px;
    z-index: 10;
    text-transform: uppercase;
}
.hero-card-rarity.senior {
    background: rgba(0,255,136,0.15);
    color: #00ff88;
    border: 1px solid rgba(0,255,136,0.3);
    text-shadow: 0 0 8px #00ff88;
}
.hero-card-rarity.junior {
    background: rgba(106,17,203,0.2);
    color: #a855f7;
    border: 1px solid rgba(168,85,247,0.3);
    text-shadow: 0 0 8px #a855f7;
}
.hero-card-rarity.ai {
    background: rgba(255,0,85,0.15);
    color: #ff0055;
    border: 1px solid rgba(255,0,85,0.3);
    text-shadow: 0 0 8px #ff0055;
}

/* Область портрета (верхние 55% карточки) */
.hero-portrait-wrap {
    position: relative;
    height: 55%;
    overflow: hidden;
    background: linear-gradient(180deg, #0a0f1c 0%, transparent 100%);
    flex-shrink: 0;
}

.hero-portrait-glow {
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 140px;
    height: 140px;
    border-radius: 50%;
    filter: blur(35px);
    opacity: 0.6;
    z-index: 0;
}
.senior-glow { background: #00ff88; }
.junior-glow { background: #a855f7; }
.ai-glow     { background: #ff0055; }

.hero-portrait {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    height: 100%;
    width: auto;
    object-fit: contain;
    object-position: bottom;
    z-index: 1;
    /* Вырезание фона: нижняя часть плавно растворяется */
    -webkit-mask-image: linear-gradient(to top, transparent 0%, black 30%);
    mask-image: linear-gradient(to top, transparent 0%, black 30%);
}

/* Панель статистики (нижние 45%) */
.hero-card-stats {
    flex: 1;
    padding: 10px 14px 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: linear-gradient(0deg, #0d1220 60%, transparent 100%);
}

.hero-name-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.hero-name {
    font-size: 1.25rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: 1px;
}

.hero-level {
    font-size: 0.65rem;
    font-weight: 700;
    color: #00ff88;
    letter-spacing: 1px;
    background: rgba(0,255,136,0.1);
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid rgba(0,255,136,0.25);
}
.hero-level.junior-lvl {
    color: #a855f7;
    background: rgba(168,85,247,0.1);
    border-color: rgba(168,85,247,0.25);
}
.hero-level.ai-lvl {
    color: #ff0055;
    background: rgba(255,0,85,0.1);
    border-color: rgba(255,0,85,0.25);
}

.hero-role {
    font-size: 0.7rem;
    color: rgba(255,255,255,0.5);
    letter-spacing: 0.5px;
}

/* XP бар */
.hero-xp-row {
    display: flex;
    align-items: center;
    gap: 6px;
}
.hero-xp-label {
    font-size: 0.55rem;
    font-weight: 700;
    color: rgba(255,255,255,0.3);
    letter-spacing: 2px;
    flex-shrink: 0;
}
.hero-xp-bar {
    flex: 1;
    height: 3px;
    background: rgba(255,255,255,0.07);
    border-radius: 2px;
    overflow: hidden;
}
.hero-xp-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 0.8s ease;
}
.senior-xp { background: linear-gradient(90deg, #00ff88, #00d4ff); box-shadow: 0 0 8px #00ff88; }
.junior-xp { background: linear-gradient(90deg, #a855f7, #818cf8); box-shadow: 0 0 8px #a855f7; }
.ai-xp     { background: linear-gradient(90deg, #ff0055, #ff6b9d); box-shadow: 0 0 8px #ff0055; animation: ai-xp-shimmer 2s infinite; }

@keyframes ai-xp-shimmer {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.hero-xp-val {
    font-size: 0.55rem;
    color: rgba(255,255,255,0.35);
    flex-shrink: 0;
    min-width: 32px;
    text-align: right;
}

/* Атрибуты */
.hero-attrs {
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.hero-attr {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.attr-name {
    font-size: 0.62rem;
    color: rgba(255,255,255,0.45);
    letter-spacing: 0.5px;
}
.attr-val {
    font-size: 0.6rem;
    color: #00ff88;
    letter-spacing: 1px;
}

.hero-flip-hint {
    font-size: 0.6rem;
    color: rgba(255,255,255,0.2);
    text-align: center;
    letter-spacing: 1px;
    margin-top: auto;
    padding-top: 4px;
    transition: color 0.3s;
}
.hero-card:hover .hero-flip-hint {
    color: rgba(255,255,255,0.45);
}

/* ── Обратная сторона ── */
.hero-card-back {
    background: linear-gradient(165deg, #0d1220, #131928);
    border: 1px solid rgba(255,255,255,0.08);
    transform: rotateY(180deg);
    display: flex;
    flex-direction: column;
    padding: 0 0 14px 0;
}

.hero-back-header {
    padding: 16px 16px 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.senior-back { border-top: 3px solid #00ff88; }
.junior-back { border-top: 3px solid #a855f7; }
.ai-back     { border-top: 3px solid #ff0055; }

.hero-back-name {
    font-size: 1.2rem;
    font-weight: 800;
    color: #fff;
}

.hero-back-badge {
    font-size: 0.6rem;
    font-weight: 700;
    color: rgba(255,255,255,0.4);
    letter-spacing: 2px;
    text-transform: uppercase;
}

.hero-back-content {
    flex: 1;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow: hidden;
}

.hero-back-content p {
    font-size: 0.72rem;
    color: rgba(255,255,255,0.65);
    line-height: 1.5;
    margin: 0;
}

.hero-back-skills {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 4px;
}

.hb-skill {
    font-size: 0.6rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
    background: rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.5);
    border: 1px solid rgba(255,255,255,0.08);
    letter-spacing: 0.5px;
}



/* ── Intro Overlay (Fullscreen) ─────────────────────────────────────────── */
.intro-overlay {
    position: fixed;
    inset: 0;
    background: #070b14;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.intro-overlay.fade-out {
    opacity: 0;
    pointer-events: none;
}

.intro-inner {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 60px;
}

/* Кольца вокруг логотипа */
.intro-logo-ring {
    position: relative;
    width: 130px;
    height: 130px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.intro-ring-1,
.intro-ring-2,
.intro-ring-3 {
    position: absolute;
    border-radius: 50%;
    border: 1px solid transparent;
}

.intro-ring-1 {
    inset: 0;
    border-color: rgba(0, 255, 136, 0.5);
    animation: intro-spin 2s linear infinite;
    border-top-color: var(--accent-green, #00ff88);
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.2);
}

.intro-ring-2 {
    inset: 14px;
    border-color: rgba(106, 17, 203, 0.4);
    animation: intro-spin 3s linear infinite reverse;
    border-bottom-color: var(--accent-1, #6a11cb);
    box-shadow: 0 0 15px rgba(106, 17, 203, 0.2);
}

.intro-ring-3 {
    inset: 28px;
    border-color: rgba(255, 0, 85, 0.3);
    animation: intro-spin 4s linear infinite;
    border-left-color: var(--accent-pink, #ff0055);
}

.intro-logo-icon {
    font-size: 3rem;
    z-index: 1;
    animation: intro-pulse 1.5s ease-in-out infinite alternate;
    filter: drop-shadow(0 0 15px rgba(0, 255, 136, 0.6));
}

@keyframes intro-spin {
    to { transform: rotate(360deg); }
}

@keyframes intro-pulse {
    from { transform: scale(0.9); opacity: 0.8; }
    to { transform: scale(1.1); opacity: 1; }
}

/* Текстовая часть */
.intro-text-block {
    max-width: 370px;
}

.intro-title {
    font-size: 2.6rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: 8px;
    margin-bottom: 8px;
    text-transform: uppercase;
    background: linear-gradient(135deg, #ffffff, #a0c4ff);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.intro-subtitle {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.5);
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 28px;
    font-family: 'Courier New', monospace;
    animation: blink-dots 1s steps(3) infinite;
}

@keyframes blink-dots {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* Прогресс-бар */
.intro-progress-wrap {
    width: 100%;
    height: 2px;
    background: rgba(255,255,255,0.08);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 18px;
}

.intro-progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--accent-green, #00ff88), var(--accent-1, #6a11cb));
    border-radius: 2px;
    transition: width 0.1s linear;
    box-shadow: 0 0 10px rgba(0,255,136,0.5);
}

.intro-tagline {
    font-size: 0.7rem;
    color: rgba(255,255,255,0.3);
    letter-spacing: 2px;
    text-transform: uppercase;
}


/* ── Gesture Promo Hint ─────────────────────────────────────────────────── */
#gesture-promo-hint {
    position: absolute;
    bottom: calc(100% + 15px);
    right: 0;
    background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
    color: white;
    padding: 8px 16px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    transform: translateY(15px);
    transition: all 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 8px 25px rgba(106, 17, 203, 0.4);
    pointer-events: none;
    z-index: 1000;
}

#gesture-promo-hint::after {
    content: '';
    position: absolute;
    top: 100%;
    right: 20px;
    border: 6px solid transparent;
    border-top-color: var(--accent-2);
}

#gesture-promo-hint.show {
    opacity: 1;
    transform: translateY(0);
    animation: hint-pulse 2.5s infinite ease-in-out;
}

@keyframes hint-pulse {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-8px) scale(1.05); box-shadow: 0 12px 30px rgba(106, 17, 203, 0.5); }
}

/* ── Reactive Orbits ─────────────────────────────────────────────────────── */
.orbit-wrap {
    transition: transform 0.3s cubic-bezier(0.2, 0, 0.2, 1), opacity 0.4s ease;
}

/* ═══════════════════════════════════════════════════════════════════════════
   GESTURE CONTROL UI
   ═══════════════════════════════════════════════════════════════════════════ */

/* Floating gesture panel */
#gesture-panel {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
    pointer-events: none;
}

/* Toggle button */
#gesture-toggle-btn {
    pointer-events: auto;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: rgba(13, 13, 13, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 100px;
    color: var(--text-color);
    font-family: 'Outfit', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

#gesture-toggle-btn:hover {
    border-color: rgba(37, 117, 252, 0.5);
    box-shadow: 0 4px 20px rgba(37, 117, 252, 0.2);
    transform: translateY(-1px);
}

/* Кнопка ? */
#gesture-help-btn {
    pointer-events: auto;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(13, 13, 13, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    flex-shrink: 0;
}
#gesture-help-btn:hover {
    color: var(--text-color);
    border-color: rgba(37, 117, 252, 0.5);
    box-shadow: 0 4px 20px rgba(37, 117, 252, 0.2);
    transform: translateY(-1px);
}

/* Панель подсказок */
#gesture-hints {
    pointer-events: none;
    position: absolute;
    bottom: calc(100% + 12px);
    right: 0;
    width: 290px;
    background: rgba(10, 10, 12, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.6);
    opacity: 0;
    transform: translateY(10px) scale(0.97);
    transition: opacity 0.25s ease, transform 0.25s ease;
    overflow: hidden;
}
#gesture-hints.open {
    pointer-events: auto;
    opacity: 1;
    transform: translateY(0) scale(1);
}

.gh-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.gh-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-color);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}
.gh-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.9rem;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 6px;
    transition: color 0.2s, background 0.2s;
    font-family: 'Outfit', sans-serif;
}
.gh-close:hover {
    color: var(--text-color);
    background: rgba(255, 255, 255, 0.06);
}

.gh-list {
    list-style: none;
    padding: 8px 0 12px;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.gh-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    transition: background 0.2s ease;
}
.gh-item:hover {
    background: rgba(255, 255, 255, 0.03);
}
.gh-emoji {
    font-size: 1.5rem;
    flex-shrink: 0;
    width: 32px;
    text-align: center;
}
.gh-desc {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.gh-desc strong {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-color);
}
.gh-desc span {
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.4;
}



/* Status dot */
.gesture-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    transition: all 0.3s ease;
    flex-shrink: 0;
}
.gesture-dot.active {
    background: var(--accent-green);
    box-shadow: 0 0 8px var(--accent-green), 0 0 16px var(--accent-green);
    animation: pulse 2s infinite;
}
.gesture-dot.loading {
    background: var(--accent-2);
    animation: gesture-spin-dot 1s linear infinite;
}
.gesture-dot.error {
    background: var(--accent-pink);
    box-shadow: 0 0 8px var(--accent-pink);
}

@keyframes gesture-spin-dot {
    0%   { transform: scale(0.6); opacity: 0.5; }
    50%  { transform: scale(1.2); opacity: 1; }
    100% { transform: scale(0.6); opacity: 0.5; }
}

/* Camera preview — всегда скрыто, камера работает в фоне */
#gesture-panel.active #gesture-video-wrap {
    display: none;
}
#gesture-video-wrap {
    display: none;
    pointer-events: none;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
    width: 160px;
    height: 120px;
    position: relative;
}
#gesture-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scaleX(-1); /* mirror for natural feel */
    display: block;
}
#gesture-canvas {
    display: none;
}
.gesture-cam-label {
    position: absolute;
    bottom: 6px;
    left: 8px;
    font-size: 0.65rem;
    color: rgba(255,255,255,0.5);
    font-family: 'Outfit', sans-serif;
    letter-spacing: 0.5px;
    pointer-events: none;
}

/* ── Virtual cursor ──────────────────────────────────────────────────────── */
#gesture-cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 255, 136, 0.9) 0%, rgba(0, 255, 136, 0.2) 60%);
    border: 2px solid rgba(0, 255, 136, 0.8);
    box-shadow: 0 0 12px rgba(0, 255, 136, 0.7), 0 0 30px rgba(0, 255, 136, 0.3);
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 99999;
    opacity: 0;
    transition: opacity 0.3s ease,
                width 0.2s ease,
                height 0.2s ease,
                background 0.2s ease,
                box-shadow 0.2s ease;
    will-change: left, top;
}

#gesture-cursor.visible {
    opacity: 1;
}

/* Pinch state */
#gesture-cursor.pinching {
    width: 14px;
    height: 14px;
    background: radial-gradient(circle, rgba(37,117,252,1) 0%, rgba(37,117,252,0.3) 60%);
    border-color: rgba(37, 117, 252, 0.9);
    box-shadow: 0 0 16px rgba(37, 117, 252, 0.9), 0 0 40px rgba(37, 117, 252, 0.4);
}

/* Click pulse */
#gesture-cursor.click-pulse {
    animation: gesture-click-burst 0.4s ease-out forwards;
}
@keyframes gesture-click-burst {
    0%   { transform: translate(-50%, -50%) scale(1);   opacity: 1; }
    50%  { transform: translate(-50%, -50%) scale(2.5); opacity: 0.6; }
    100% { transform: translate(-50%, -50%) scale(1);   opacity: 1; }
}

/* ── Gesture hover state on orbit items ──────────────────────────────────── */
.orbit-item.gesture-hover {
    width: 160px !important;
    left: -80px !important;
    background: var(--glass-bg) !important;
    border-color: var(--accent-green) !important;
    box-shadow: 0 0 30px rgba(0, 255, 136, 0.6), 0 0 60px rgba(0, 255, 136, 0.2) !important;
}
.orbit-item.gesture-hover .orbit-glow-wrap {
    opacity: 1 !important;
}
.orbit-item.gesture-hover .orbit-glow-wrap::before {
    background: conic-gradient(from 0deg, transparent, var(--accent-green), var(--accent-2), transparent) !important;
}
.orbit-item.gesture-hover .orbit-icon {
    opacity: 0 !important;
    transform: scale(0.5) translateY(20px) !important;
}
.orbit-item.gesture-hover .orbit-text {
    opacity: 1 !important;
    transform: scale(1) translateY(0) !important;
}

/* ── Gesture hover для обычных кнопок и ссылок внутри вкладок ───────────── */
.cta-button.gesture-hover,
.close-tab.gesture-hover,
.back-link.gesture-hover {
    transform: translateY(-2px) scale(1.04);
    filter: brightness(1.25);
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.5), 0 6px 20px rgba(0, 0, 0, 0.4) !important;
    border-color: rgba(0, 255, 136, 0.6) !important;
    outline: 1px solid rgba(0, 255, 136, 0.3);
    transition: all 0.25s ease !important;
}

.news-card.gesture-hover,
.bento-card.gesture-hover,
.team-card.gesture-hover {
    border-color: var(--accent-green) !important;
    box-shadow: 0 0 25px rgba(0, 255, 136, 0.2), 0 8px 30px rgba(0,0,0,0.5) !important;
    transform: translateY(-4px) scale(1.01);
    background: rgba(255, 255, 255, 0.06) !important;
}

/* Hero Card gesture hover */
.hero-card.gesture-hover {
    transform: translateY(-10px);
}
.hero-card.gesture-hover .hero-card-inner {
    box-shadow: 0 0 30px rgba(0, 255, 136, 0.35), 0 0 60px rgba(0, 255, 136, 0.1);
    border-radius: 16px;
    outline: 1px solid rgba(0, 255, 136, 0.5);
}
/* Кастомный цвет по типу карточки при hover жестом */
.hero-card.gesture-hover:has(.senior) .hero-card-inner {
    box-shadow: 0 0 30px rgba(0, 255, 136, 0.4), 0 0 60px rgba(0, 255, 136, 0.15);
    outline-color: rgba(0, 255, 136, 0.6);
}
.hero-card.gesture-hover:has(.junior) .hero-card-inner {
    box-shadow: 0 0 30px rgba(168, 85, 247, 0.4), 0 0 60px rgba(168, 85, 247, 0.15);
    outline-color: rgba(168, 85, 247, 0.6);
}
.hero-card.gesture-hover:has(.ai) .hero-card-inner {
    box-shadow: 0 0 30px rgba(255, 0, 85, 0.4), 0 0 60px rgba(255, 0, 85, 0.15);
    outline-color: rgba(255, 0, 85, 0.6);
}

.back-link.gesture-hover {
    color: var(--accent-green) !important;
}

/* Специальный розовый ховер для иконки поддержки */
.orbit-wrap-support .orbit-item.gesture-hover {
    border-color: var(--accent-pink) !important;
    box-shadow: 0 0 30px rgba(255, 0, 85, 0.6), 0 0 60px rgba(255, 0, 85, 0.2) !important;
}
.orbit-wrap-support .orbit-item.gesture-hover .orbit-glow-wrap::before {
    background: conic-gradient(from 0deg, transparent, var(--accent-pink), #ff6b9d, transparent) !important;
}

/* Ховер для ссылок внутри терминала (О проекте) */
.term-line a.gesture-hover {
    background: rgba(255, 0, 85, 0.15);
    border-radius: 4px;
    padding: 0 4px;
    box-shadow: 0 0 12px rgba(255, 0, 85, 0.3);
    color: #fff !important;
    border-bottom: 1px solid var(--accent-pink) !important;
    transition: all 0.2s ease;
}

/* Курсор меняет вид когда над кликабельным элементом */
#gesture-cursor.over-target {
    width: 36px;
    height: 36px;
    background: transparent;
    border: 2px solid rgba(0, 255, 136, 0.9);
    box-shadow: 0 0 14px rgba(0, 255, 136, 0.8), 0 0 35px rgba(0, 255, 136, 0.3);
}

/* ── Gesture mode: подписи орбитальных иконок ───────────────────────────── */
body.gesture-mode .electro-wrapper:not(.state-rect) .orbit-item {
    width: 145px !important;
    left: -72px !important;
    background: rgba(10, 10, 10, 0.96) !important;
    border-color: rgba(0, 255, 136, 0.2) !important;
    box-shadow: 0 0 18px rgba(0, 0, 0, 0.7) !important;
}
body.gesture-mode .electro-wrapper:not(.state-rect) .orbit-item .orbit-icon {
    opacity: 0 !important;
    transform: scale(0.5) translateY(20px) !important;
}
body.gesture-mode .electro-wrapper:not(.state-rect) .orbit-item .orbit-text {
    opacity: 1 !important;
    transform: scale(1) translateY(0) !important;
    font-size: 0.8rem !important;
    color: var(--text-muted) !important;
}

/* ── Свайп-влево: flash-анимация на курсоре ─────────────────────────────── */
#gesture-cursor.swipe-flash {
    animation: gesture-swipe-flash 0.5s ease-out forwards;
}
@keyframes gesture-swipe-flash {
    0%   { width: 24px;  height: 24px; border-radius: 50%; opacity: 1; }
    40%  { width: 70px;  height: 20px; border-radius: 10px; opacity: 0.8;
            box-shadow: -24px 0 28px rgba(37,117,252,0.9); }
    100% { width: 24px;  height: 24px; border-radius: 50%; opacity: 1; }
}

/* ── Скрытие управления жестами на мобильных устройствах ───────────────── */
@media (max-width: 950px) {
    #gesture-panel, 
    #gesture-cursor {
        display: none !important;
    }

    /* Убираем горизонтальный скролл на мобилках */
    html, body {
        overflow-x: hidden !important;
        width: 100%;
        position: relative;
    }
}

/* ── Глобальное скрытие полос прокрутки (при сохранении функции скролла) ── */
*::-webkit-scrollbar {
    display: none !important; /* Safari and Chrome */
}
* {
    -ms-overflow-style: none !important;  /* IE and Edge */
    scrollbar-width: none !important;  /* Firefox */
}

/* ── MUSIC PLAYER ──────────────────────────────────────────────────────── */
.music-player {
    position: fixed;
    bottom: 24px;
    left: 24px;
    z-index: 9999;
    border-radius: 16px;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    width: 280px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s ease;
}

.music-player.hidden {
    transform: translateY(150px);
    opacity: 0;
    pointer-events: none;
}

.music-player:hover {
    border-color: rgba(0, 255, 136, 0.3);
    box-shadow: 0 10px 40px rgba(0, 255, 136, 0.15);
}

.mp-badge {
    background: linear-gradient(90deg, #ff0055, #a200ff);
    color: white;
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    text-align: center;
    padding: 4px 0;
    letter-spacing: 1px;
}

.mp-inner {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    gap: 12px;
}

.mp-cover {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    background-color: rgba(255, 255, 255, 0.05);
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    position: relative;
}

.mp-info {
    flex-grow: 1;
    overflow: hidden;
    white-space: nowrap;
}

.mp-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-color);
    text-overflow: ellipsis;
    overflow: hidden;
    margin-bottom: 3px;
}

.mp-desc {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-overflow: ellipsis;
    overflow: hidden;
}

.mp-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.mp-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.1rem;
    cursor: pointer;
    transition: color 0.2s, transform 0.2s;
    outline: none;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.mp-btn:hover {
    color: white;
    transform: scale(1.1);
}

.mp-play-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(0, 255, 136, 0.1);
    color: #00ff88;
    border: 1px solid rgba(0, 255, 136, 0.3);
}

.mp-play-btn:hover {
    background: rgba(0, 255, 136, 0.2);
    box-shadow: 0 0 10px rgba(0, 255, 136, 0.4);
    color: #ffffff;
}

.music-player.playing .mp-play-btn {
    background: rgba(37, 117, 252, 0.1);
    color: #2575fc;
    border-color: rgba(37, 117, 252, 0.3);
}

.music-player.playing .mp-play-btn:hover {
    background: rgba(37, 117, 252, 0.2);
    box-shadow: 0 0 10px rgba(37, 117, 252, 0.4);
    color: #ffffff;
}

/* EQ Bars Animation */
.mp-eq {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    height: 16px;
    opacity: 0;
    transition: opacity 0.3s;
    position: absolute;
    bottom: 6px;
    right: 6px;
    background: rgba(0,0,0,0.6);
    padding: 4px;
    border-radius: 4px;
}

.music-player.playing .mp-eq {
    opacity: 1;
}

.mp-bar {
    width: 4px;
    background: #00ff88;
    border-radius: 2px;
    animation: eq-anim 1s infinite ease-in-out;
}

.mp-bar:nth-child(1) { height: 60%; animation-delay: 0.1s; }
.mp-bar:nth-child(2) { height: 100%; animation-delay: 0.3s; }
.mp-bar:nth-child(3) { height: 40%; animation-delay: 0.5s; }

@keyframes eq-anim {
    0%, 100% { transform: scaleY(1); }
    50% { transform: scaleY(0.4); }
}

/* Progress Bar */
.mp-progress-area {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 16px 16px;
}

.mp-time {
    font-size: 0.65rem;
    color: var(--text-muted);
    font-weight: 600;
    min-width: 32px;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.mp-progress-container {
    flex-grow: 1;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    cursor: pointer;
    position: relative;
    display: flex;
    align-items: center;
    transition: height 0.2s;
}

.mp-progress-container:hover {
    height: 6px;
}

.mp-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #00ff88, #2575fc);
    border-radius: 2px;
    width: 0%;
    position: relative;
    pointer-events: none;
}

.mp-progress-thumb {
    width: 12px;
    height: 12px;
    background: white;
    border-radius: 50%;
    position: absolute;
    right: -6px;
    top: 50%;
    transform: translateY(-50%) scale(0);
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
    transition: transform 0.2s;
}

.mp-progress-container:hover .mp-progress-thumb {
    transform: translateY(-50%) scale(1);
}

@media (max-width: 600px) {
    .music-player {
        bottom: 12px;
        left: 12px;
        right: 12px;
        width: auto;
    }
}
