:root {
    --bg-dark: #09090b;
    --bg-glass: rgba(24, 24, 27, 0.7);
    --border: 1px solid rgba(255, 255, 255, 0.1);
    --accent: #8b5cf6;
    --accent-glow: rgba(139, 92, 246, 0.4);
    --cyan: #06b6d4;
    --red: #f43f5e;
    --orange: #f97316;
    --text: #e4e4e7;
    --text-muted: #a1a1aa;
    --font-ui: 'Inter', sans-serif;
    --font-code: 'JetBrains Mono', monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    background: var(--bg-dark);
    color: var(--text);
    font-family: var(--font-ui);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Background FX */
.background-fx {
    position: fixed; inset: 0; z-index: -1;
    background: 
        radial-gradient(circle at 15% 50%, rgba(139, 92, 246, 0.15), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(6, 182, 212, 0.15), transparent 25%);
}

.main-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* HEADER & LOGO */
.header { text-align: center; margin-bottom: 40px; }
.logo-container { display: flex; justify-content: center; margin-bottom: 25px; }

.logo-border {
    position: relative;
    padding: 10px 30px;
    border-radius: 12px;
    background: linear-gradient(#09090b, #09090b) padding-box,
                linear-gradient(45deg, var(--accent), var(--cyan), var(--red)) border-box;
    border: 2px solid transparent;
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.2);
}

.logo-text {
    font-family: var(--font-code);
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -1px;
}

.highlight { 
    background: linear-gradient(90deg, var(--accent), #fff, var(--cyan), var(--accent));
    background-size: 200%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: shimmerText 3s infinite linear;
    text-shadow: 0 0 15px var(--accent-glow);
}

@keyframes shimmerText {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

.nav-tabs {
    display: inline-flex;
    background: rgba(255,255,255,0.05);
    padding: 5px;
    border-radius: 12px;
    gap: 5px;
    flex-wrap: wrap;
    justify-content: center;
}

.tab-btn {
    background: transparent; border: none; color: var(--text-muted);
    padding: 10px 20px; font-size: 1rem; border-radius: 8px;
    cursor: pointer; font-family: var(--font-ui); transition: 0.3s;
    display: flex; align-items: center; gap: 8px;
}
.tab-btn:hover { color: #fff; background: rgba(255,255,255,0.05); }
.tab-btn.active {
    background: var(--accent); color: #fff; box-shadow: 0 4px 12px var(--accent-glow);
}

/* CONTENT */
.content { flex: 1; position: relative; }
.page { display: none; }
.page.active { display: block; animation: fadeIn 0.4s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.glass-box {
    background: var(--bg-glass); border: var(--border);
    backdrop-filter: blur(12px); border-radius: 16px; padding: 30px;
}

/* PROFILE */
.profile-layout { display: flex; flex-direction: column; gap: 30px; }
.profile-banner {
    width: 100%; aspect-ratio: 16 / 9; max-height: 400px;
    border-radius: 16px; overflow: hidden; position: relative; border: var(--border);
}
.banner-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.banner-overlay {
    position: absolute; bottom: 0; left: 0; width: 100%; padding: 30px;
    background: linear-gradient(transparent, rgba(0,0,0,0.95));
}
.banner-overlay h1 { font-size: 3rem; margin-bottom: 10px; font-family: var(--font-code); color: #fff; }
.tags-row { display: flex; gap: 10px; flex-wrap: wrap; }
.tag { font-family: var(--font-code); color: var(--cyan); background: rgba(6, 182, 212, 0.2); padding: 4px 10px; border-radius: 4px; font-size: 0.9rem; border: 1px solid rgba(6, 182, 212, 0.3); }

.profile-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 30px; }

.bio-block h2 { margin-bottom: 15px; color: var(--accent); }
.bio-block p { line-height: 1.6; color: var(--text-muted); font-size: 1.05rem; margin-bottom: 25px; }

.links-area h3 { font-size: 1rem; color: #fff; margin-bottom: 15px; border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 5px; }
.link-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }

.link-btn {
    display: flex; align-items: center; gap: 10px;
    background: rgba(255,255,255,0.05); padding: 10px 15px; border-radius: 8px;
    text-decoration: none; color: var(--text-muted); font-size: 0.9rem; font-family: var(--font-code);
    border: 1px solid transparent; transition: 0.2s;
}
.link-btn:hover { background: rgba(255,255,255,0.1); color: #fff; border-color: rgba(255,255,255,0.1); }
.link-btn.channel { color: var(--cyan); border-color: rgba(6, 182, 212, 0.2); }
.link-btn.squad { color: var(--accent); border-color: rgba(139, 92, 246, 0.2); }
.link-btn.squad:hover { background: var(--accent); color: #fff; }
.link-btn.archive { color: var(--orange); }
.link-btn.web:hover { border-color: var(--accent); }
.link-btn.locked { opacity: 0.5; cursor: not-allowed; }

.skills-block h3 { margin-bottom: 20px; font-size: 1.1rem; }
.skill-bar { margin-bottom: 15px; }
.skill-bar .label { display: flex; justify-content: space-between; font-size: 0.9rem; margin-bottom: 5px; font-family: var(--font-code); }
.bar-bg { width: 100%; height: 8px; background: rgba(255,255,255,0.1); border-radius: 4px; overflow: hidden; }
.bar-fill { height: 100%; }
.purple { background: var(--accent); box-shadow: 0 0 10px var(--accent); }
.blue { background: var(--cyan); box-shadow: 0 0 10px var(--cyan); }
.red { background: var(--red); box-shadow: 0 0 10px var(--red); }
.error { color: var(--red); }

/* MODULES */
.modules-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 25px; }
.module-card { position: relative; overflow: hidden; transition: 0.3s; display: flex; flex-direction: column; }
.module-card:hover { transform: translateY(-3px); }
.card-content { position: relative; z-index: 2; }

.fire-card { border-color: rgba(244, 63, 94, 0.3); }
.fire-card:hover { border-color: var(--red); box-shadow: 0 0 20px rgba(244, 63, 94, 0.2); }
.fire-bg {
    position: absolute; bottom: 0; left: 0; width: 100%; height: 60%;
    background: radial-gradient(ellipse at bottom, rgba(244, 63, 94, 0.15) 0%, transparent 70%);
    filter: blur(20px); z-index: 1; animation: firePulse 3s infinite alternate;
}
@keyframes firePulse { 0% { opacity: 0.5; transform: scaleY(1); } 100% { opacity: 1; transform: scaleY(1.2); } }

.storm-card { border-color: rgba(6, 182, 212, 0.3); }
.storm-card:hover { border-color: var(--cyan); box-shadow: 0 0 20px rgba(6, 182, 212, 0.2); }
.storm-bg { position: absolute; inset: 0; z-index: 1; }
.storm-bg::before {
    content: ''; position: absolute; inset: 0; background: rgba(255,255,255,0.03);
    opacity: 0; animation: lightning 5s infinite random;
}
@keyframes lightning {
    0% { opacity: 0; } 2% { opacity: 0.2; } 3% { opacity: 0; } 4% { opacity: 0.2; } 6% { opacity: 0; } 100% { opacity: 0; }
}

.card-head { display: flex; gap: 15px; margin-bottom: 15px; }
.icon-glow { font-size: 2rem; color: var(--accent); filter: drop-shadow(0 0 5px var(--accent)); }
.icon-glow.red { color: var(--red); filter: drop-shadow(0 0 5px var(--red)); }
.icon-glow.blue { color: var(--cyan); filter: drop-shadow(0 0 5px var(--cyan)); }
.card-title h3 { font-size: 1.4rem; }
.badge { font-size: 0.8rem; background: rgba(255,255,255,0.1); padding: 2px 8px; border-radius: 4px; }
.badge.red { color: var(--red); background: rgba(244, 63, 94, 0.1); }
.badge.blue { color: var(--cyan); background: rgba(6, 182, 212, 0.1); }
.desc { color: var(--text-muted); margin-bottom: 20px; line-height: 1.5; min-height: 60px; }
.versions-wrapper { border-top: 1px solid rgba(255,255,255,0.05); padding-top: 15px; }
.v-label { font-size: 0.85rem; color: var(--text-muted); display: block; margin-bottom: 10px; }
.v-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.v-btn {
    text-decoration: none; color: var(--text); background: rgba(255,255,255,0.05);
    padding: 6px 12px; border-radius: 6px; font-size: 0.85rem; font-family: var(--font-code);
    transition: 0.2s; border: 1px solid transparent;
}
.v-btn:hover { background: rgba(255,255,255,0.1); border-color: #555; }
.v-btn.final { border-color: var(--accent); color: var(--accent); background: rgba(139, 92, 246, 0.1); }
.v-btn.final:hover { background: var(--accent); color: #fff; }

/* UTILS */
.util-item { display: flex; align-items: center; gap: 20px; padding: 15px; border-bottom: 1px solid rgba(255,255,255,0.05); }
.util-item:last-child { border: none; }
.u-icon { font-size: 1.5rem; color: var(--text-muted); width: 40px; text-align: center; }
.u-info h4 { margin-bottom: 4px; }
.u-info p { font-size: 0.9rem; color: var(--text-muted); }
.u-info { flex: 1; }
.dl-btn { 
    padding: 8px 16px; border: 1px solid var(--cyan); color: var(--cyan); 
    text-decoration: none; border-radius: 6px; font-weight: 500; transition: 0.2s; 
}
.dl-btn:hover { background: var(--cyan); color: #000; }

/* TERMINAL */
.terminal-container {
    height: 600px; background: #0c0c0e; border-radius: 12px; border: var(--border);
    display: flex; flex-direction: column; font-family: var(--font-code);
    box-shadow: 0 10px 40px rgba(0,0,0,0.5); overflow: hidden;
}
.term-bar { background: #18181b; padding: 10px 15px; display: flex; align-items: center; border-bottom: 1px solid #333; }
.circles { display: flex; gap: 8px; margin-right: 15px; }
.c { width: 12px; height: 12px; border-radius: 50%; }
.red { background: #ef4444; } .yellow { background: #eab308; } .green { background: #22c55e; }
.term-title { color: #71717a; font-size: 0.85rem; }

.term-screen {
    flex: 1; padding: 20px; overflow-y: auto;
    font-size: 0.95rem; line-height: 1.5; color: #d4d4d8;
    scrollbar-width: thin; scrollbar-color: #333 #0c0c0e;
}
.term-screen::-webkit-scrollbar { width: 8px; }
.term-screen::-webkit-scrollbar-track { background: #0c0c0e; }
.term-screen::-webkit-scrollbar-thumb { background: #333; border-radius: 4px; }

.term-input-area { background: #18181b; padding: 15px; display: flex; align-items: center; }
.prompt { color: var(--accent); margin-right: 10px; font-weight: bold; }
#termInput { background: transparent; border: none; color: #fff; flex: 1; font-family: var(--font-code); font-size: 1rem; outline: none; }

.t-cmd { color: #fff; }
.t-gray { color: #71717a; }
.t-green { color: #22c55e; }
.t-blue { color: #06b6d4; }
.t-purple { color: #a855f7; }
.t-red { color: #ef4444; }
.t-ascii { line-height: 1.2; color: var(--accent); font-weight: bold; margin-bottom: 10px; white-space: pre; }

/* FOOTER */
.footer {
    margin-top: auto; padding-top: 40px; padding-bottom: 20px;
    display: flex; justify-content: center; gap: 30px;
}
.footer a {
    color: var(--text-muted); font-size: 2rem; transition: 0.3s;
    display: flex; align-items: center; justify-content: center;
    width: 60px; height: 60px; background: rgba(255,255,255,0.03);
    border-radius: 50%; border: 1px solid rgba(255,255,255,0.05);
    text-decoration: none;
}
.footer a:hover {
    color: #fff; transform: translateY(-5px); border-color: var(--accent);
    background: var(--accent); box-shadow: 0 5px 20px var(--accent-glow);
}

/* MOBILE */
@media (max-width: 768px) {
    .profile-grid { grid-template-columns: 1fr; }
    .banner-overlay h1 { font-size: 2rem; }
    
    .nav-tabs { 
        width: 100%; justify-content: flex-start; overflow-x: auto; 
        flex-wrap: nowrap; white-space: nowrap; 
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none; 
    }
    .nav-tabs::-webkit-scrollbar { display: none; }
    
    .tab-btn { padding: 10px; font-size: 0.9rem; flex-shrink: 0; }
    .module-card { padding: 20px; }
    .terminal-container { height: 400px; }
    .profile-banner { aspect-ratio: 16/10; }
    .footer a { width: 50px; height: 50px; font-size: 1.5rem; }
}

/* --- ICON FIX (Лечим квадратики) --- */
.fas, .fa-solid {
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900 !important;
}
.fab, .fa-brands {
    font-family: "Font Awesome 6 Brands" !important;
    font-weight: 400 !important;
}