/* --- VARIABLES & RESET --- */
:root {
    --bg-dark: #0a0a0a;
    --bg-card: #141414;
    --primary: #D4AF37; /* Gold/Amber akin to the wood in photo */
    --text-main: #ffffff;
    --text-muted: #a0a0a0;
    --font-head: 'Montserrat', sans-serif;
    --font-code: 'JetBrains Mono', monospace;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
    cursor: none; /* Hide default cursor for custom one */
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-head);
    overflow-x: hidden;
}

/* --- CUSTOM CURSOR --- */
.cursor {
    position: fixed;
    width: 8px;
    height: 8px;
    background-color: var(--primary);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: width 0.2s, height 0.2s;
}

.cursor2 {
    position: fixed;
    width: 40px;
    height: 40px;
    border: 1px solid var(--primary);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9998;
    transform: translate(-50%, -50%);
    transition: all 0.1s ease-out;
}

/* --- NAVIGATION & BURGER MENU --- */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 5%;
    position: fixed;
    width: 100%;
    top: 0;
    background: rgba(10, 10, 10, 0.9);
    backdrop-filter: blur(10px);
    z-index: 100;
}

.logo {
    font-family: var(--font-code);
    font-weight: 700;
    color: var(--primary);
    font-size: 1.5rem;
    text-decoration: none;
    z-index: 101; /* Щоб лого було поверх меню */
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 20px;
}

@media (max-width: 1000px) {
    .nav-links { gap: 8px; }
}

.nav-links a {
    text-decoration: none;
    color: var(--text-main);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--primary);
}

/* Стилі для іконки бургера */
.hamburger {
    display: none;
    cursor: pointer;
    z-index: 101;
}

.hamburger div {
    width: 25px;
    height: 3px;
    background-color: var(--text-main);
    margin: 5px;
    transition: all 0.3s ease;
}

/* --- HERO SECTION --- */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 10%;
    position: relative;
    overflow: hidden;
}

/* Background subtle element */
.hero::before {
    content: '';
    position: absolute;
    top: -20%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.1) 0%, rgba(0,0,0,0) 70%);
    z-index: 0;
}

.hero-content {
    max-width: 600px;
    z-index: 1;
}

h1.glitch {
    font-size: 4rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 10px;
    text-transform: uppercase;
    position: relative;
}

.typing-text {
    font-family: var(--font-code);
    color: var(--primary);
    font-size: 1.5rem;
    margin-bottom: 20px;
}

.blink {
    animation: blinker 1s linear infinite;
}

@keyframes blinker { 50% { opacity: 0; } }

.hero-desc {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 40px;
    max-width: 80%;
}

/* CTA Group styling for flexbox control */
.cta-group {
    display: flex;
    gap: 15px;
}

.btn {
    padding: 12px 30px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
}

.btn-primary {
    background: var(--primary);
    color: #000;
}

.btn-primary:hover {
    background: #fff;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(212, 175, 55, 0.3);
}

.btn-outline {
    border: 1px solid var(--text-main);
    color: var(--text-main);
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* Photo Styling */
.hero-image-container {
    position: relative;
    z-index: 1;
}

.image-frame {
    width: 350px;
    height: 500px;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    box-shadow: 20px 20px 0px rgba(20, 20, 20, 1);
    border: 2px solid #333;
}

.hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensures photo covers area beautifully */
    filter: grayscale(20%) contrast(110%);
    transition: filter 0.5s;
}

.hero-img:hover {
    filter: grayscale(0%) contrast(100%);
}

/* Floating Badges */
.floating-badge {
    position: absolute;
    background: rgba(20, 20, 20, 0.9);
    padding: 10px 20px;
    border: 1px solid var(--primary);
    border-radius: 50px;
    color: var(--primary);
    font-family: var(--font-code);
    font-size: 0.8rem;
    backdrop-filter: blur(5px);
    animation: float 6s ease-in-out infinite;
}

.badge-1 { top: 50px; left: -30px; }
.badge-2 { bottom: 50px; right: -30px; animation-delay: 1s; }

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
    100% { transform: translateY(0px); }
}

/* --- WHY WORK WITH ME SECTION --- */
.why-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.why-card {
    background: linear-gradient(145deg, #121212, #0e0e0e);
    padding: 35px 30px;
    border-radius: 12px;
    border: 1px solid #222;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.why-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary);
    box-shadow: 0 10px 30px -10px rgba(212, 175, 55, 0.15);
}

.why-card .icon-box {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 25px;
    transition: transform 0.3s;
}

.why-card:hover .icon-box {
    transform: scale(1.1);
}

.why-card h3 {
    color: #fff;
    font-size: 1.4rem;
    margin-bottom: 15px;
    font-weight: 700;
}

.why-card p {
    color: #a0a0a0;
    line-height: 1.6;
    font-size: 0.95rem;
}

/* Decor element for Why Cards */
.why-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--primary);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.why-card:hover::after {
    transform: scaleX(1);
}

/* --- SECTIONS GENERAL --- */
.section {
    padding: 100px 10%;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 60px;
    text-align: center;
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--primary);
    margin: 10px auto 0;
}

/* --- STACK GRID --- */
.stack-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.stack-card {
    background: var(--bg-card);
    padding: 30px;
    border-radius: 15px;
    border: 1px solid #333;
    transition: transform 0.3s, border-color 0.3s;
}

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

.stack-card h3 {
    margin-bottom: 20px;
    color: var(--primary);
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tags span {
    background: #222;
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-family: var(--font-code);
    color: #ccc;
}

/* --- TIMELINE EXPERIENCE (UPDATED ANIMATIONS) --- */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 2px;
    background: #333;
    top: 0;
    bottom: 0;
    left: 0; /* Simple left aligned timeline */
    margin-left: 20px;
}

.timeline-item {
    position: relative;
    margin-bottom: 50px;
    padding-left: 60px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: 11px;
    top: 5px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--bg-dark);
    border: 3px solid var(--primary);
    z-index: 10;
}

/* Анімація для контенту досвіду */
.timeline-content {
    background: var(--bg-card);
    padding: 30px;
    border-radius: 10px;
    border-left: 3px solid var(--primary);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.timeline-content:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    border-left: 3px solid #fff; /* Яскравий акцент при наведенні */
}

.timeline-content h3 {
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.timeline-content h4 {
    color: var(--text-muted);
    margin-bottom: 15px;
    font-weight: 400;
}

.date {
    font-family: var(--font-code);
    color: var(--primary);
    font-size: 0.9rem;
    display: block;
    margin-bottom: 10px;
}

.job-desc {
    list-style-position: inside;
    color: #ddd;
    line-height: 1.6;
}

/* --- EDUCATION (UPDATED ANIMATIONS) --- */
.education-grid {
    display: flex;
    gap: 30px;
    justify-content: center;
    flex-wrap: wrap;
}

.edu-card {
    background: linear-gradient(145deg, #141414, #0f0f0f);
    padding: 40px;
    border-radius: 15px;
    text-align: center;
    border: 1px solid #333;
    flex: 1;
    min-width: 300px;
    max-width: 500px;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

/* Анімація для освіти */
.edu-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary);
    box-shadow: 0 10px 30px rgba(212, 175, 55, 0.1);
}

.edu-card h3 {
    color: #fff;
    margin-bottom: 10px;
}

.edu-date {
    color: var(--primary);
    font-family: var(--font-code);
    margin-top: 15px;
    display: block;
}

/* --- GOALS SECTION --- */
.goals-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 900px;
    margin: 0 auto;
}

.goal-card {
    display: flex;
    align-items: center; /* Центруємо вертикально */
    background: rgba(20, 20, 20, 0.6);
    border: 1px solid #333;
    border-radius: 8px;
    padding: 30px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

/* Ховер ефект для картки */
.goal-card:hover {
    background: rgba(30, 30, 30, 0.9);
    border-color: var(--primary);
    transform: translateX(10px); /* Зсув вправо при наведенні */
}

/* Стилізація номера (01, 02...) */
.goal-number {
    font-family: var(--font-code);
    font-size: 3.5rem;
    font-weight: 700;
    color: #333; /* Темний колір у спокої */
    margin-right: 40px;
    line-height: 1;
    transition: color 0.3s ease, text-shadow 0.3s ease;
    min-width: 80px; /* Фіксуємо ширину, щоб текст не скакав */
}

.goal-card:hover .goal-number {
    color: var(--primary); /* Стає золотим при наведенні */
    text-shadow: 0 0 15px rgba(212, 175, 55, 0.4);
}

.goal-content h3 {
    color: #fff;
    font-size: 1.3rem;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.goal-content p {
    color: var(--text-muted);
    line-height: 1.6;
    font-size: 0.95rem;
}

/* --- FOOTER --- */
footer {
    text-align: center;
    padding: 80px 10%;
    background: #050505;
}

.footer-content h2 {
    font-size: 3rem;
    margin-bottom: 40px;
    color: #fff;
}

.contact-links {
    margin-bottom: 30px;
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.contact-item {
    color: var(--primary);
    text-decoration: none;
    font-size: 1.2rem;
    border-bottom: 1px solid transparent;
    transition: border-bottom 0.3s;
}

.contact-item:hover {
    border-bottom: 1px solid var(--primary);
}

.socials {
    margin-bottom: 40px;
}

.socials a {
    color: #fff;
    margin: 0 15px;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}

.socials a:hover {
    color: var(--primary);
}

.copyright {
    color: #555;
    font-family: var(--font-code);
    font-size: 0.8rem;
}

/* --- ANIMATIONS --- */
.reveal {
    position: relative;
    transform: translateY(50px);
    opacity: 0;
    transition: 1s all ease;
}

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

/* --- MOBILE RESPONSIVENESS (UPDATED & FIXED) --- */

@media (max-width: 1450px) {
    .hamburger { display: block; }

    .nav-links {
        position: absolute;
        right: 0px;
        top: 0px;
        height: 100vh;
        background: #000;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        width: 100%; 
        transform: translateY(-100%); /* Ховаємо вгору */
        transition: transform 0.4s ease-in;
        padding-top: 60px;
    }

    .nav-links.nav-active {
        transform: translateY(0%);
    }

    .nav-links li {
        margin: 20px 0;
    }
    
    .nav-links a {
        font-size: 1rem;
    }

    /* Анімація перетворення бургера в хрестик */
    .toggle .line1 { transform: rotate(-45deg) translate(-5px, 6px); }
    .toggle .line2 { opacity: 0; }
    .toggle .line3 { transform: rotate(45deg) translate(-5px, -6px); }
}

@media (max-width: 1000px) {   
    /* 2. Стилізуємо виїжджаюче меню */


    /* 3. ФІКС HERO СЕКЦІЇ */
    .hero {
        flex-direction: column-reverse;
        justify-content: center;
        text-align: center;
        padding-top: 100px;
        height: auto; /* Дозволяємо висоті адаптуватися */
        min-height: 100vh;
        padding-bottom: 50px;
    }
    
    .hero-content {
        margin-top: 40px;
        display: flex;
        flex-direction: column;
        align-items: center; /* Центруємо елементи по горизонталі */
    }

    .hero-desc {
        max-width: 100%;
    }
    
    .cta-group {
        justify-content: center;
        flex-wrap: wrap; /* Кнопки стають одна під одною на дуже малих екранах */
    }
    
    .image-frame {
        width: 280px;
        height: 380px;
    }

    h1.glitch {
        font-size: 2.5rem;
    }

    /* Адаптація Goals для мобілок */
    .goal-card {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
    }
    
    .goal-number {
        font-size: 2.5rem;
        margin-bottom: 15px;
        margin-right: 0;
    }
}

/* --- TERMINAL MODAL --- */
.terminal-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    color: #000;
    cursor: pointer;
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.4);
    z-index: 9999;
    transition: transform 0.3s;
}

.terminal-btn:hover { transform: scale(1.1) rotate(15deg); }

.terminal-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 10000;
    display: none; /* Hidden by default */
    justify-content: center;
    align-items: center;
}

.terminal-overlay.open { display: flex; }

.terminal-window {
    width: 600px;
    height: 400px;
    background: #1a1a1a;
    border-radius: 8px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    border: 1px solid #333;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    font-family: 'JetBrains Mono', monospace;
}

.terminal-header {
    background: #252525;
    padding: 10px 15px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #333;
}

.terminal-header .btns span {
    display: inline-block;
    width: 12px; height: 12px;
    border-radius: 50%;
    margin-right: 8px;
}
.close { background: #ff5f56; cursor: pointer; }
.min { background: #ffbd2e; }
.max { background: #27c93f; }

.terminal-header .title {
    margin-left: auto; margin-right: auto;
    color: #aaa; font-size: 0.8rem;
}

.terminal-body {
    padding: 20px;
    color: #0f0; /* Matrix Green */
    flex: 1;
    overflow-y: auto;
    font-size: 1.01rem;
}

.input-line { display: flex; align-items: center; margin-top: 10px; }
.prompt { color: var(--primary); margin-right: 10px; }
#cmd-input {
    background: transparent; border: none; color: #fff;
    font-family: 'JetBrains Mono', monospace;
    flex: 1; outline: none; font-size: 0.9rem;
}
.cmd-highlight { color: #fff; font-weight: bold; }

/* --- JSON MODE SWITCH --- */
.mode-switch-container {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-right: auto; /* Щоб посунути до логотипу */
    margin-left: 30px;
    z-index: 102;
}

.mode-label {
    font-size: 0.8rem;
    font-family: var(--font-code);
    color: var(--text-muted);
    font-weight: bold;
}

/* The Switch Box */
.switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 20px;
}

.switch input { opacity: 0; width: 0; height: 0; }

.slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #333;
    transition: .4s;
    border-radius: 34px;
    border: 1px solid #555;
}

.slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 2px;
    background-color: #fff;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: var(--primary);
    border-color: var(--primary);
}

input:checked + .slider:before {
    transform: translateX(18px);
    background-color: #000;
}

/* --- JSON VIEW CONTAINER --- */
.json-overlay {
    display: none; /* Сховано за замовчуванням */
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: var(--bg-dark);
    z-index: 90; /* Нижче меню, але вище контенту */
    padding: 100px 5% 50px 5%;
    overflow-y: auto;
}

.code-window {
    max-width: 1000px;
    margin: 0 auto;
    background: #1e1e1e;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    border: 1px solid #333;
    font-family: 'JetBrains Mono', monospace;
}

.window-header {
    background: #252526;
    padding: 10px 15px;
    border-bottom: 1px solid #333;
    display: flex;
    align-items: center;
    border-radius: 8px 8px 0 0;
}

.dots { display: flex; gap: 8px; }
.dot { width: 12px; height: 12px; border-radius: 50%; }
.dot.red { background: #ff5f56; }
.dot.yellow { background: #ffbd2e; }
.dot.green { background: #27c93f; }

.filename {
    margin-left: 20px;
    color: #ccc;
    font-size: 0.9rem;
}

/* Syntax Highlighting Colors */
pre {
    margin: 0;
    padding: 20px;
    color: #d4d4d4;
    font-size: 0.95rem;
    line-height: 1.5;
    overflow-x: auto;
}
.key { color: #9cdcfe; } /* Light Blue */
.string { color: #ce9178; } /* Orange/Brown */
.number { color: #b5cea8; } /* Light Green */
.boolean { color: #569cd6; } /* Blue */
.null { color: #569cd6; }

/* --- DEPLOYMENT MODAL --- */
.deploy-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 20000; /* Over everything */
    display: none;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
}

.deploy-window {
    width: 500px;
    background: #0d1117; /* GitHub Dark Dimmed */
    border: 1px solid #30363d;
    border-radius: 6px;
    font-family: 'JetBrains Mono', monospace;
    box-shadow: 0 0 50px rgba(0, 255, 0, 0.1);
    overflow: hidden;
}

.deploy-header {
    background: #161b22;
    padding: 15px 20px;
    border-bottom: 1px solid #30363d;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.deploy-title {
    color: #c9d1d9;
    font-weight: bold;
    font-size: 0.9rem;
}

.deploy-status {
    font-size: 0.8rem;
    color: #e3b341; /* Yellow for running */
    font-weight: bold;
    animation: pulse 1s infinite;
}

.deploy-body {
    padding: 20px;
}

.progress-bar-container {
    width: 100%;
    height: 6px;
    background: #21262d;
    border-radius: 3px;
    margin-bottom: 20px;
    overflow: hidden;
}

.progress-bar {
    width: 0%;
    height: 100%;
    background: #238636; /* Green */
    transition: width 0.3s ease;
    box-shadow: 0 0 10px #238636;
}

.deploy-logs {
    height: 150px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 0.85rem;

    /* --- Стилізація для Firefox --- */
    scrollbar-width: thin; /* Робить скрол тонким */
    scrollbar-color: #555 #2d2d2d;
}

/* --- Стилізація для Chrome, Safari, Edge --- */

/* Ширина всього скролбару */
.deploy-logs::-webkit-scrollbar {
    width: 8px; /* Можна змінити на 6px, якщо хочеш ще тонше */
}

.deploy-logs::-webkit-scrollbar-track {
    background: #2d2d2d; /* Темний фон треку */
}

.deploy-logs::-webkit-scrollbar-thumb {
    background: #555; /* Темно-сірий повзунок */
    border: 2px solid #2d2d2d; /* Створює відступ від країв, роблячи повзунок візуально "плаваючим" */
}

.deploy-logs::-webkit-scrollbar-thumb:hover {
    background: #777;
}

.log-item {
    color: #8b949e;
    opacity: 0;
    animation: fadeIn 0.3s forwards;
    display: flex;
    align-items: center;
    gap: 10px;
}

.log-item.success { color: #3fb950; }
.log-item i { width: 15px; }

@keyframes fadeIn { to { opacity: 1; } }
@keyframes pulse { 50% { opacity: 0.5; } }

/* --- API PLAYGROUND STYLES --- */
.api-container {
    display: flex;
    background: #112240;
    border-radius: 10px;
    box-shadow: 0 10px 30px -10px rgba(2,12,27,0.7);
    overflow: hidden;
    font-family: 'JetBrains Mono', monospace;
    border: 1px solid #233554;
    max-width: 900px;
    margin: 0 auto;
    min-height: 400px;
}

/* Sidebar */
.api-sidebar {
    width: 30%;
    background: #0a192f;
    border-right: 1px solid #233554;
    padding: 15px;
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #233554;
}

.sidebar-title {
    color: #ccd6f6;
    font-size: 0.8rem;
    font-weight: bold;
    margin-left: auto;
}

.endpoint-list {
    list-style: none;
    padding: 0;
}

.endpoint-item {
    padding: 10px;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s;
    margin-bottom: 5px;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #8892b0;
}

.endpoint-item:hover, .endpoint-item.active {
    background: #112240;
    color: #e6f1ff;
}

.method {
    font-weight: bold;
    font-size: 0.7rem;
    padding: 2px 5px;
    border-radius: 3px;
    min-width: 35px;
    text-align: center;
}

.method.get { color: #64ffda; background: rgba(100, 255, 218, 0.1); }
.method.post { color: #ffd700; background: rgba(255, 215, 0, 0.1); }

/* Main Window */
.api-window {
    width: 70%;
    display: flex;
    flex-direction: column;
}

.request-bar {
    padding: 15px;
    background: #0a192f;
    border-bottom: 1px solid #233554;
    display: flex;
    align-items: center;
    gap: 10px;
}

@media (max-width: 1100px) {
.request-bar {
    flex-direction: column;
}
}

.req-method {
    color: #64ffda;
    font-weight: bold;
}

.req-url {
    background: #112240;
    border: 1px solid #233554;
    color: #ccd6f6;
    padding: 8px 12px;
    border-radius: 4px;
    width: 100%;
    font-family: inherit;
    font-size: 0.9rem;
}

.btn-send {
    background: #64ffda;
    color: #0a192f;
    border: none;
    padding: 8px 20px;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-width: 120px;
}

.btn-send:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(100, 255, 218, 0.3);
}

.response-area {
    padding: 15px;
    flex-grow: 1;
    background: #112240;
    display: flex;
    flex-direction: column;
}

.response-meta {
    display: flex;
    gap: 15px;
    font-size: 0.8rem;
    color: #8892b0;
    margin-bottom: 10px;
    border-bottom: 1px solid #233554;
    padding-bottom: 5px;
}

.json-window {
    flex-grow: 1;
    overflow-y: auto;
    color: #ccd6f6;
    font-size: 0.9rem;
}

.json-window pre { margin: 0; }

/* Mobile Adaptability */
@media (max-width: 1100px) {
    .api-container { flex-direction: column; }
    .api-sidebar { width: 100%; border-right: none; border-bottom: 1px solid #233554; }
    .api-window { width: 100%; }
}

/* Syntax Highlighting for API */
.string { color: #a8ff60; }
.number { color: #ff9d00; }
.boolean { color: #ff628c; }
.key { color: #64ffda; }
.null { color: #ff628c; }

/* --- CODE EVOLUTION STYLES --- */
.code-compare-container {
    max-width: 900px;
    margin: 0 auto;
    background: #1e1e1e; /* VS Code Dark Background */
    border-radius: 10px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    overflow: hidden;
    border: 1px solid #333;
}

.code-header {
    background: #252526;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #333;
}

.window-buttons { display: flex; gap: 8px; }

/* Toggle Switch Styling */
.switch-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
}

.switch-label {
    font-weight: bold;
    font-size: 0.8rem;
    transition: color 0.3s;
}

.switch-label.junior { color: #ff6b6b; }
.switch-label.senior { color: #4ec9b0; opacity: 0.5; }

.code-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.code-switch input { opacity: 0; width: 0; height: 0; }

.code-slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #333;
    transition: .4s;
    border-radius: 24px;
}

.code-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: #fff;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .code-slider { background-color: #64ffda; }
input:checked + .code-slider:before { transform: translateX(26px); }

/* Code Content */
.code-content {
    padding: 20px;
    animation: fadeIn 0.5s ease;
}

.file-name {
    color: #9cdcfe;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    margin-bottom: 10px;
    opacity: 0.8;
}

pre {
    background: transparent;
    overflow-x: auto;
    margin: 0;
}

code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    line-height: 1.5;
    color: #d4d4d4;
}

/* Syntax Highlighting */
.kwd { color: #569cd6; font-weight: bold; } /* Keywords: const, async, if */
.func { color: #dcdcaa; } /* Functions */
.str { color: #ce9178; } /* Strings */
.type { color: #4ec9b0; } /* Types */
.decorator { color: #dcdcaa; } /* Decorators */
.comment { color: #6a9955; font-style: italic; } /* Comments */
.class-name { color: #4ec9b0; }

/* Analysis Bar */
.code-analysis {
    margin-top: 20px;
    padding: 10px;
    border-radius: 5px;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.code-analysis.bad {
    background: rgba(255, 107, 107, 0.1);
    color: #ff6b6b;
    border: 1px solid rgba(255, 107, 107, 0.3);
}

.code-analysis.good {
    background: rgba(100, 255, 218, 0.1);
    color: #64ffda;
    border: 1px solid rgba(100, 255, 218, 0.3);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- CODE TABS STYLES --- */
.code-tabs-wrapper {
    display: flex;
    background: #0a192f;
    border-bottom: 1px solid #333;
    overflow-x: auto; /* На випадок якщо не влізе на мобілці */
}

.code-tab {
    padding: 12px 20px;
    background: transparent;
    border: none;
    border-right: 1px solid #333;
    color: #8892b0;
    cursor: pointer;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.code-tab:hover {
    background: #1e1e1e;
    color: #fff;
}

.code-tab.active {
    background: #1e1e1e;
    color: #64ffda;
    border-top: 2px solid #64ffda; /* Активна вкладка */
}

.code-tab i {
    font-size: 0.9rem;
}

/* Адаптація висоти контенту, щоб не стрибало */
.code-content {
    min-height: 632px;
}

/* --- MUSIC PLAYER STYLES --- */
.music-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    max-width: 900px;
    margin: 0 auto;
}

.music-info-side {
    flex: 1;
}

.vibe-status {
    margin-top: 20px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    border: 1px solid #233554;
    padding: 10px;
    border-radius: 4px;
    background: rgba(10, 25, 47, 0.5);
    display: inline-block;
}

@media (max-width: 410px) {
    .vibe-status { height: 61px; }
}

/* The Player Card */
.apple-player {
    position: relative;
    width: 320px;
    background: rgba(22, 33, 62, 0.8);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 20px;
    padding: 25px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    overflow: hidden;
    text-align: center;
}

/* Dynamic Background Glow */
.player-blur-bg {
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: radial-gradient(circle, rgba(100,255,218,0.15) 0%, transparent 60%);
    z-index: -1;
    transition: background 1s ease;
}

/* Album Art */
.album-cover-wrapper {
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
}

.album-cover {
    width: 180px;
    height: 180px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    overflow: hidden;
    object-fit: contain;
    transition: transform 0.5s ease;
}

#album-img {
    object-fit: cover;
    width: 180px;
    height: 180px;
}

/* Placeholder Art if no image */
.vinyl-gradient {
    width: 100%; height: 100%;
    background: linear-gradient(45deg, #ff9a9e 0%, #fad0c4 99%, #fad0c4 100%);
    background-size: 200% 200%;
    animation: gradientAnim 5s ease infinite;
}

@keyframes gradientAnim { 
    0% {background-position: 0% 50%}
    50% {background-position: 100% 50%}
    100% {background-position: 0% 50%}
}

.track-info h4 {
    margin: 0;
    height: 71px;
    font-size: 1.2rem;
    color: #fff;
}

.track-info p {
    margin: 5px 0 15px;
    color: #8892b0;
    font-size: 0.9rem;
}

/* Progress Bar */
.progress-container {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.75rem;
    color: #8892b0;
    margin-bottom: 20px;
}

.progress-bar-bg {
    flex-grow: 1;
    height: 4px;
    background: rgba(255,255,255,0.1);
    border-radius: 2px;
    overflow: hidden;
}

.progress-fill {
    width: 0%;
    height: 100%;
    background: #fff;
    border-radius: 2px;
    transition: width 0.1s linear;
}

/* Controls */
.controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 25px;
}

.ctrl-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.2rem;
    cursor: pointer;
    transition: color 0.3s;
}

.ctrl-btn:hover { color: #64ffda; }

.play-pause {
    width: 50px; height: 50px;
    background: #fff;
    color: #000;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    box-shadow: 0 5px 15px rgba(255,255,255,0.2);
}

.play-pause:hover { 
    color: #000; 
    transform: scale(1.1); 
}

/* Sound Wave Animation */
.sound-wave {
    display: flex;
    justify-content: center;
    gap: 3px;
    height: 20px;
    margin-top: 15px;
    opacity: 0; /* Hidden when paused */
    transition: opacity 0.3s;
}

.sound-wave.playing { opacity: 1; }

.bar {
    width: 3px;
    background: #64ffda;
    border-radius: 2px;
    animation: bounce 1s infinite ease-in-out;
}

.bar:nth-child(1) { animation-delay: 0.0s; height: 10px; }
.bar:nth-child(2) { animation-delay: 0.1s; height: 15px; }
.bar:nth-child(3) { animation-delay: 0.2s; height: 20px; }
.bar:nth-child(4) { animation-delay: 0.3s; height: 12px; }
.bar:nth-child(5) { animation-delay: 0.4s; height: 8px; }

@keyframes bounce {
    0%, 100% { transform: scaleY(1); }
    50% { transform: scaleY(2); }
}

/* Responsive */
@media (max-width: 768px) {
    .music-container { flex-direction: column; text-align: center; }
}

/* --- MUSIC NOTIFICATION & CONTROLS --- */

/* Стиль для заблокованих кнопок */
.ctrl-btn.disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none; /* Фізично забороняє клік */
}

/* Стиль сповіщення (Toast) */
.music-toast {
    position: absolute;
    top: 15px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(10, 25, 47, 0.95);
    border: 1px solid #64ffda;
    color: #fff;
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-family: 'JetBrains Mono', monospace;
    z-index: 10;
    width: 90%;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
    
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.music-toast.show {
    opacity: 1;
    visibility: visible;
    top: 25px; /* Ефект виїжджання */
}

.music-toast i {
    color: #ffd700;
    margin-right: 5px;
}

/* --- GLOBAL NETWORK WIDGET --- */
.network-container {
    max-width: 800px;
    margin: 0 auto;
    background: rgba(17, 34, 64, 0.8);
    border: 1px solid #233554;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    position: relative;
    overflow: hidden;
}

/* Abstract Map Grid */
.network-map {
    height: 200px;
    position: relative;
    border-bottom: 1px solid #233554;
    margin-bottom: 20px;
    background-image:
            linear-gradient(rgba(100, 255, 218, 0.05) 1px, transparent 1px),
            linear-gradient(90deg, rgba(100, 255, 218, 0.05) 1px, transparent 1px);
    background-size: 40px 40px;
}

/* Nodes */
.node {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #ccd6f6;
    z-index: 2;
}

.node i { font-size: 1.5rem; margin-bottom: 5px; }
.node-label { font-size: 0.7rem; font-family: 'JetBrains Mono', monospace; font-weight: bold; background: #0a192f; padding: 2px 5px; border-radius: 4px; }

/* Positioning */
.server-node { top: 30%; left: 20%; color: #64ffda; }
.user-node { top: 60%; right: 20%; color: #ffd700; opacity: 0; transition: opacity 1s; }
.user-node.visible { opacity: 1; }

/* Pulse Animation */
.pulse {
    position: absolute;
    width: 40px; height: 40px;
    border-radius: 50%;
    border: 1px solid #64ffda;
    top: 5px; /* Adjust based on icon size */
    animation: pulseAnim 2s infinite;
    z-index: -1;
}

.user-pulse { border-color: #ffd700; }

@keyframes pulseAnim {
    0% { transform: scale(0.5); opacity: 1; }
    100% { transform: scale(2); opacity: 0; }
}

/* Connection Line */
.connection-line {
    position: absolute;
    top: 45%; left: 25%;
    width: 50%; height: 2px;
    background: rgba(255, 255, 255, 0.1);
    transform: rotate(15deg);
    overflow: hidden;
}

.packet {
    width: 20px; height: 100%;
    background: #64ffda;
    box-shadow: 0 0 10px #64ffda;
    position: absolute;
    left: -20px;
    animation: packetFlow 2s infinite linear;
}

@keyframes packetFlow {
    0% { left: -10%; }
    100% { left: 110%; }
}

/* Stats */
.network-stats {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    font-family: 'JetBrains Mono', monospace;
}

.stat-box {
    flex: 1;
    background: #0a192f;
    padding: 10px;
    border-radius: 5px;
    text-align: center;
    border: 1px solid #233554;
}

.stat-label {
    display: block;
    font-size: 0.7rem;
    color: #8892b0;
    margin-bottom: 5px;
}

.stat-value {
    font-size: 0.9rem;
    color: #fff;
    font-weight: bold;
}

.status-ok { color: #64ffda; text-shadow: 0 0 5px rgba(100,255,218,0.5); }
.status-warn { color: #ffd700; }

.network-msg {
    text-align: center;
    font-size: 0.8rem;
    color: #8892b0;
    margin-top: 15px;
    font-style: italic;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .network-stats { flex-direction: column; }
    .connection-line { width: 40%; left: 30%; transform: rotate(45deg); top: 40%; }
    .server-node { left: 10%; }
    .user-node { right: 10%; top: 70%; }
}