/* Общие стили */
:root {
    --bg-primary: #0a0a1a;
    --bg-secondary: #12122a;
    --accent-engineering: #0088ff;
    --accent-engineering-gradient: linear-gradient(135deg, #0088ff, #00ddff);
    --accent-interactive: #00ff88;
    --accent-interactive-gradient: linear-gradient(135deg, #00ff88, #88ffaa);
    --accent-creative: #ff00ff;
    --accent-creative-gradient: linear-gradient(135deg, #ff00ff, #ff88ff);
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.9);
    --text-muted: rgba(255, 255, 255, 0.7);
    --shadow-neon: 0 0 10px currentColor, 0 0 20px currentColor;
    --transition: all 0.3s ease;
    --bg-card: rgba(18, 18, 42, 0.8);
}

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

body {
    font-family: 'Exo 2', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    overflow-x: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Фоновое видео для всего сайта */
#background-video {
    position: fixed;
    top: 0;
    left: 0;
    min-width: 100%;
    min-height: 100%;
    z-index: -2;
    opacity: 0.6;
    filter: brightness(0.5) contrast(1.2);
}

.container {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
}

/* Шапка */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    background-color: rgba(10, 10, 26, 0.95);
    backdrop-filter: blur(10px);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(0, 136, 255, 0.2);
}

.logo h1 {
    font-family: 'Orbitron', sans-serif;
    font-size: 2.5rem;
    font-weight: 900;
    background: var(--accent-engineering-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: var(--shadow-neon);
}

.logo .ai {
    color: var(--accent-engineering);
}

.logo .subtitle {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.nav ul {
    display: flex;
    list-style: none;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    padding: 0.75rem 1.5rem;
    border-radius: 30px;
    margin: 0 0.5rem;
    transition: var(--transition);
    display: flex;
    align-items: center;
    font-weight: 500;
}

.nav-link i {
    margin-right: 0.5rem;
}

.nav-link:hover,
.nav-link.active {
    color: var(--accent-engineering);
    background-color: rgba(0, 136, 255, 0.1);
    text-shadow: var(--shadow-neon);
}

.user-type-selector {
    position: relative;
}

.current-user-type {
    padding: 0.5rem 1rem;
    background: var(--accent-engineering-gradient);
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
    min-width: 80px;
    text-align: center;
}

.user-type-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background-color: var(--bg-secondary);
    border-radius: 10px;
    padding: 0.5rem;
    display: none;
    flex-direction: column;
    min-width: 150px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    z-index: 1001;
}

.user-type-selector:hover .user-type-dropdown {
    display: flex;
}

.user-type-dropdown button {
    background: none;
    border: none;
    color: var(--text-secondary);
    padding: 0.75rem;
    text-align: left;
    cursor: pointer;
    border-radius: 5px;
}

.user-type-dropdown button:hover {
    background-color: rgba(0, 136, 255, 0.1);
    color: var(--accent-engineering);
}

/* Основное содержимое */
.main-content {
    margin-top: 100px;
    position: relative;
    z-index: 1;
    flex: 1;
    padding-bottom: 2rem;
}

.section {
    display: none;
    padding: 2rem;
    position: relative;
}

.section.active {
    display: block;
    animation: fadeIn 1s;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-family: 'Orbitron', sans-serif;
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    text-shadow: 0 0 10px rgba(0, 136, 255, 0.5);
}

.section-header p {
    font-size: 1.2rem;
    color: var(--text-muted);
}

/* Лаборатория - УМЕНЬШЕНА ВЫСОТА */
.lab-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    height: 450px;
    min-height: 400px;
    max-height: 500px;
}

.video-scene-container {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 20px;
    overflow: hidden;
    background: rgba(10, 10, 26, 0.7);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(0, 136, 255, 0.2);
}

.spheres-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.9;
}

.clickable-sphere {
    position: absolute;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 3;
    transition: all 0.3s ease;
    opacity: 0.7;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulse 3s infinite;
    top: 50%;
    transform: translateY(-50%);
}

.clickable-sphere:hover {
    opacity: 1;
    transform: translateY(-50%) scale(1.1);
    animation: pulse-fast 1s infinite;
}

.sphere-inner {
    width: 60%;
    height: 60%;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    backdrop-filter: blur(5px);
    top: 10%;
}

/* Кластеры в одну линию - СМЕЩЕНЫ ЛЕВЕЕ ДЛЯ ЦЕНТРИРОВАНИЯ */
.sphere-engineering {
    left: 10%;
    background: rgba(0, 136, 255, 0.15);
    border: 2px solid hsl(181, 100%, 50%);
    box-shadow: 0 0 30px rgba(0, 234, 255, 0.845), inset 0 0 20px rgba(0, 136, 255, 0.3);
}

.sphere-engineering .sphere-inner {
    color: #00eaff;
}

.sphere-interactive {
    left: 37.5%;
    transform: translateY(-50%);
    background: rgba(0, 255, 136, 0.15);
    border: 2px solid #00ff88;
    box-shadow: 0 0 30px rgba(0, 255, 136, 0.7), inset 0 0 20px rgba(0, 255, 136, 0.3);
}

.sphere-interactive .sphere-inner {
    color: #00ff11;
}

.sphere-creative {
    left: 65%;
    transform: translateY(-50%);
    background: rgba(255, 0, 255, 0.15);
    border: 2px solid #ff00ff;
    box-shadow: 0 0 30px rgba(255, 0, 255, 0.7), inset 0 0 20px rgba(255, 0, 255, 0.3);
}

.sphere-creative .sphere-inner {
    color: #ff00ff;
}

/* Эффект печатающегося текста на шарах - ШРИФТ НЕ ЖИРНЫЙ */
.sphere-label {
    position: absolute;
    top: -50%;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    color: rgb(1, 1, 18);
    font-size: 1rem;
    font-weight: 500;
    margin-top: 15px;
    font-family: 'Orbitron', sans-serif;
    letter-spacing: 1px;
}

/* Стили для эффекта печатания */
.typing-text {
    overflow: hidden;
    border-right: 3px solid;
    white-space: nowrap;
    animation: typing 3.5s steps(40, end), blink-caret 0.75s step-end infinite;
    width: 0;
    display: inline-block;
}

.sphere-engineering .typing-text {
    border-right-color: #0088ff;
    animation: typing 3.5s steps(40, end) 0.5s forwards, blink-caret 0.75s step-end infinite;
}

.sphere-interactive .typing-text {
    border-right-color: #00ff88;
    animation: typing 3.5s steps(40, end) 1.5s forwards, blink-caret 0.75s step-end infinite;
}

.sphere-creative .typing-text {
    border-right-color: #ff00ff;
    animation: typing 3.5s steps(40, end) 2.5s forwards, blink-caret 0.75s step-end infinite;
}

@keyframes typing {
    from { width: 0 }
    to { width: 100% }
}

@keyframes blink-caret {
    from, to { border-color: transparent }
    50% { border-color: currentColor; }
}

.sphere-instruction {
    position: absolute;
    top: 120%;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    font-style: italic;
    text-shadow: 0 0 5px black;
    opacity: 0;
    transition: opacity 0.3s;
}

.clickable-sphere:hover .sphere-instruction {
    opacity: 1;
}

.scene-controls {
    position: absolute;
    bottom: 20px;
    right: 20px;
    z-index: 10;
    display: flex;
    gap: 10px;
}

.scene-controls button {
    padding: 10px 20px;
    background: linear-gradient(135deg, #0088ff, #00ddff);
    border: none;
    border-radius: 25px;
    color: white;
    cursor: pointer;
    font-family: 'Exo 2', sans-serif;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.scene-controls button:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 136, 255, 0.3);
}

.cluster-info {
    background-color: rgba(18, 18, 42, 0.8);
    border-radius: 20px;
    padding: 2rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 136, 255, 0.2);
    overflow-y: auto;
    max-height: 450px;
}

.cluster-info h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--accent-engineering);
}

.cluster-details {
    margin-top: 2rem;
}

.detail-item {
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    border-radius: 15px;
    background-color: rgba(255, 255, 255, 0.05);
    border-left: 5px solid;
    transition: all 0.3s ease;
    cursor: pointer;
}

.detail-item.clickable-cluster {
    cursor: pointer;
}

.detail-item.clickable-cluster:hover {
    transform: translateX(10px);
    background-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.detail-item h4 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.engineering-color {
    color: var(--accent-engineering);
}

.interactive-color {
    color: var(--accent-interactive);
}

.creative-color {
    color: var(--accent-creative);
}

.detail-projects {
    margin-top: 10px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.project-count {
    background: rgba(0, 136, 255, 0.1);
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
}

.demo-notice {
    background: rgba(0, 255, 136, 0.1);
    border: 1px solid rgba(0, 255, 136, 0.3);
    border-radius: 10px;
    padding: 15px;
    margin-top: 20px;
    text-align: center;
}

.demo-notice i {
    color: #00ff88;
    margin-right: 10px;
}

/* Проекты */
.category-filters {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.75rem 1.5rem;
    background-color: rgba(255, 255, 255, 0.05);
    border: 2px solid transparent;
    border-radius: 30px;
    color: var(--text-secondary);
    cursor: pointer;
    font-family: 'Exo 2', sans-serif;
    font-weight: 600;
    transition: var(--transition);
}

.filter-btn.active,
.filter-btn:hover {
    border-color: var(--accent-engineering);
    color: var(--accent-engineering);
    text-shadow: var(--shadow-neon);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.project-card {
    background-color: rgba(18, 18, 42, 0.8);
    border-radius: 20px;
    overflow: hidden;
    transition: var(--transition);
    border: 2px solid transparent;
    backdrop-filter: blur(10px);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-10px);
    border-color: var(--accent-engineering);
    box-shadow: 0 20px 40px rgba(0, 136, 255, 0.2);
}

.project-card.engineering {
    border-color: var(--accent-engineering);
}

.project-card.interactive {
    border-color: var(--accent-interactive);
}

.project-card.creative {
    border-color: var(--accent-creative);
}

/* Стили для иконок в карточках проектов */
.project-icon-wrapper {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.project-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    z-index: 2;
    opacity: 0.9;
    box-shadow: 0 0 30px currentColor;
    transition: all 0.3s ease;
}

.project-card:hover .project-icon {
    transform: translate(-50%, -50%) scale(1.1);
    opacity: 1;
    box-shadow: 0 0 50px currentColor;
}

.project-icon.engineering-icon {
    background: rgba(0, 136, 255, 0.2);
    color: var(--accent-engineering);
    border: 2px solid var(--accent-engineering);
}

.project-icon.interactive-icon {
    background: rgba(0, 255, 136, 0.2);
    color: var(--accent-interactive);
    border: 2px solid var(--accent-interactive);
}

.project-icon.creative-icon {
    background: rgba(255, 0, 255, 0.2);
    color: var(--accent-creative);
    border: 2px solid var(--accent-creative);
}

.project-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.4) blur(2px);
    transition: all 0.3s ease;
}

.project-card:hover .project-image {
    filter: brightness(0.6) blur(0);
}

.project-info {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.project-category {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 1rem;
    align-self: flex-start;
}

.engineering-badge {
    background-color: rgba(0, 136, 255, 0.2);
    color: var(--accent-engineering);
}

.interactive-badge {
    background-color: rgba(0, 255, 136, 0.2);
    color: var(--accent-interactive);
}

.creative-badge {
    background-color: rgba(255, 0, 255, 0.2);
    color: var(--accent-creative);
}

.project-info h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.project-info > p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    line-height: 1.5;
    flex-grow: 1;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.tech-tag {
    padding: 0.25rem 0.75rem;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    font-size: 0.8rem;
}

.project-actions {
    display: flex;
    gap: 1rem;
    margin-top: auto;
}

.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 30px;
    border: none;
    font-family: 'Exo 2', sans-serif;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    flex: 1;
}

.btn-primary {
    background: var(--accent-engineering-gradient);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 136, 255, 0.3);
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--accent-interactive);
    color: var(--accent-interactive);
}

.btn-outline:hover {
    background-color: rgba(0, 255, 136, 0.1);
}

/* Об авторе */
.about-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 3rem;
}

.author-card {
    background-color: rgba(18, 18, 42, 0.8);
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 136, 255, 0.2);
}

.author-avatar {
    font-size: 5rem;
    color: var(--accent-engineering);
    margin-bottom: 1rem;
}

.author-info h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.author-title {
    color: var(--accent-engineering);
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    line-height: 1.4;
}

.author-info p {
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.skills-container {
    background-color: rgba(18, 18, 42, 0.8);
    border-radius: 20px;
    padding: 2rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 136, 255, 0.2);
}

.skills-container h3 {
    font-size: 2rem;
    margin-bottom: 2rem;
    color: var(--accent-engineering);
}

.skill-category {
    margin-bottom: 2rem;
}

.skill-category h4 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.skill-tag {
    padding: 0.5rem 1rem;
    background-color: rgba(0, 136, 255, 0.2);
    border-radius: 20px;
    color: var(--accent-engineering);
    font-weight: 600;
    border: 1px solid rgba(0, 136, 255, 0.3);
}

/* Контакты */
.contact-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 3rem;
}

.contact-info {
    background-color: rgba(18, 18, 42, 0.8);
    border-radius: 20px;
    padding: 2rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 136, 255, 0.2);
}

.contact-info h3 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: var(--accent-engineering);
}

.contact-info p {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.contact-form {
    background-color: rgba(18, 18, 42, 0.8);
    border-radius: 20px;
    padding: 2rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 136, 255, 0.2);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    background-color: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: var(--text-primary);
    font-family: 'Exo 2', sans-serif;
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-engineering);
    background-color: rgba(255, 255, 255, 0.1);
}

.submit-btn {
    padding: 1rem 2rem;
    background: var(--accent-engineering-gradient);
    border: none;
    border-radius: 30px;
    color: white;
    font-family: 'Exo 2', sans-serif;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    width: 100%;
}

.submit-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 136, 255, 0.3);
}

/* Голосовой помощник - КОМПАКТНЫЙ ВЕРСИЯ ДЛЯ МОБИЛЬНЫХ */
.voice-assistant {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 400px;
    max-width: calc(100vw - 40px);
    background-color: rgba(18, 18, 42, 0.95);
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    z-index: 1000;
    border: 2px solid var(--accent-engineering);
    transition: var(--transition);
    backdrop-filter: blur(10px);
    max-height: 500px;
    overflow: hidden;
}

.voice-assistant.collapsed {
    height: 60px;
    overflow: hidden;
}

.assistant-header {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    background-color: rgba(0, 136, 255, 0.1);
    border-radius: 20px 20px 0 0;
    cursor: pointer;
    min-height: 60px;
}

.assistant-avatar {
    font-size: 1.5rem;
    color: var(--accent-engineering);
    margin-right: 0.75rem;
    min-width: 40px;
}

.assistant-info {
    flex-grow: 1;
    min-width: 0;
}

.assistant-info h3 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.assistant-status {
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.assistant-controls {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.assistant-controls button {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--accent-engineering-gradient);
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    flex-shrink: 0;
    font-size: 0.9rem;
}

.assistant-controls button:hover {
    transform: scale(1.1);
}

.assistant-body {
    padding: 0.75rem;
    max-height: 900px;
    overflow-y: auto;
}

.chat-messages {
    height: 150px;
    overflow-y: auto;
    margin-bottom: 0.75rem;
    padding-right: 5px;
    display: flex;
    flex-direction: column;
}

.chat-messages::-webkit-scrollbar {
    width: 4px;
}

.chat-messages::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: var(--accent-engineering);
    border-radius: 2px;
}

/* Улучшение отображения сообщений */
.message {
    display: flex;
    margin-bottom: 10px;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    max-width: 90%;
}

.message.show {
    opacity: 1;
    transform: translateY(0);
}

.message.assistant {
    align-self: flex-start;
}

.message.user {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.message-content {
    max-width: 100%;
    padding: 10px;
    border-radius: 12px;
    background-color: rgba(255, 255, 255, 0.05);
    word-break: break-word;
    position: relative;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    font-size: 0.9rem;
}

.message.assistant .message-content {
    background: linear-gradient(135deg, rgba(0, 100, 255, 0.1), rgba(0, 200, 255, 0.05));
    border: 1px solid rgba(0, 100, 255, 0.2);
}

.message.user .message-content {
    background: linear-gradient(135deg, rgba(120, 0, 255, 0.1), rgba(200, 0, 255, 0.05));
    border: 1px solid rgba(120, 0, 255, 0.2);
}

.message.system .message-content {
    background-color: rgba(255, 0, 255, 0.1);
    border: 1px solid rgba(255, 0, 255, 0.2);
    font-size: 0.8rem;
}

.message-time {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 3px;
    text-align: right;
}

.message-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--accent-engineering-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 0.25rem;
    flex-shrink: 0;
    font-size: 0.9rem;
}

.message.user .message-avatar {
    background: var(--accent-interactive-gradient);
}

.message.system .message-avatar {
    background: var(--accent-creative-gradient);
}

.message-text {
    line-height: 1.3;
}

.message.system {
    flex-direction: row;
    align-self: center;
}

.chat-input-container {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    align-items: center;
}

.chat-input-container input {
    flex-grow: 1;
    padding: 0.5rem 0.75rem;
    background-color: rgba(255, 255, 255, 0.05);
    border: 2px solid transparent;
    border-radius: 20px;
    color: var(--text-primary);
    font-family: 'Exo 2', sans-serif;
    font-size: 0.9rem;
    transition: var(--transition);
    min-width: 0;
}

.chat-input-container input:focus {
    outline: none;
    border-color: var(--accent-engineering);
}

.voice-btn,
.send-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--accent-engineering-gradient);
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    flex-shrink: 0;
    font-size: 0.9rem;
}

.voice-btn:hover,
.send-btn:hover {
    transform: scale(1.1);
}

/* Анимация для активного микрофона */
.voice-btn.listening {
    background: var(--accent-interactive) !important;
    animation: pulse-microphone 1.5s infinite;
}

@keyframes pulse-microphone {
    0% { box-shadow: 0 0 0 0 rgba(0, 200, 255, 0.7); }
    70% { box-shadow: 0 0 0 8px rgba(0, 200, 255, 0); }
    100% { box-shadow: 0 0 0 0 rgba(0, 200, 255, 0); }
}

/* Визуализатор голоса */
.voice-visualizer-active {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, 
        transparent,
        var(--accent-interactive),
        var(--accent-engineering),
        var(--accent-creative),
        transparent
    );
    animation: wave 1.5s infinite linear;
}

@keyframes wave {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* Улучшение подсказок */
.chat-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 5px;
    padding-top: 10px;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
}

.chat-suggestions p {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 6px;
    width: 100%;
}

.suggestion-btn {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    padding: 4px 8px;
    border-radius: 15px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text-primary);
    white-space: nowrap;
}

.suggestion-btn:hover {
    background: rgba(255,255,255,0.2);
    transform: translateY(-2px);
}

/* Футер */
.footer {
    text-align: center;
    padding: 1.5rem;
    background-color: rgba(18, 18, 42, 0.8);
    color: var(--text-muted);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(0, 136, 255, 0.2);
    margin-top: auto;
    position: relative;
    z-index: 100;
    font-size: 0.9rem;
}

/* Модальное окно */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 15px;
}

.modal.active {
    display: flex;
}

.modal-content {
    background-color: rgba(18, 18, 42, 0.95);
    border-radius: 15px;
    padding: 1.5rem;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    border: 2px solid var(--accent-engineering);
    backdrop-filter: blur(20px);
    animation: modalAppear 0.3s ease;
}

.close-modal {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    font-size: 1.5rem;
    color: var(--text-primary);
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    transition: var(--transition);
}

.close-modal:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

/* Стили для содержимого модального окна проектов */
.project-details {
    color: var(--text-primary);
}

.project-details h2 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.8rem;
    margin-bottom: 0.75rem;
    color: var(--accent-engineering);
}

/* Стили для иконки категории в модальном окне */
.project-category-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.project-category-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.project-category-icon.engineering-icon {
    background: rgba(0, 136, 255, 0.2);
    color: var(--accent-engineering);
    border: 2px solid var(--accent-engineering);
    box-shadow: 0 0 20px rgba(0, 136, 255, 0.3);
}

.project-category-icon.interactive-icon {
    background: rgba(0, 255, 136, 0.2);
    color: var(--accent-interactive);
    border: 2px solid var(--accent-interactive);
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.3);
}

.project-category-icon.creative-icon {
    background: rgba(255, 0, 255, 0.2);
    color: var(--accent-creative);
    border: 2px solid var(--accent-creative);
    box-shadow: 0 0 20px rgba(255, 0, 255, 0.3);
}

.project-header-text {
    flex-grow: 1;
}

.project-header-text h2 {
    margin-bottom: 0.5rem;
}

.project-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.project-details h3 {
    font-size: 1.3rem;
    margin: 1.2rem 0 0.8rem 0;
    color: var(--accent-engineering);
    display: flex;
    align-items: center;
    gap: 8px;
}

.project-details h3 i {
    font-size: 1rem;
}

.project-description p {
    line-height: 1.5;
    margin-bottom: 0.8rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0.8rem 0;
}

.tech-tags .tech-tag {
    padding: 0.4rem 0.8rem;
    background: rgba(0, 136, 255, 0.2);
    border-radius: 15px;
    color: var(--accent-engineering);
    font-size: 0.8rem;
    border: 1px solid rgba(0, 136, 255, 0.3);
}

.project-links {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.github-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0.6rem 1.2rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    color: var(--text-primary);
    text-decoration: none;
    transition: var(--transition);
    margin-top: 0.8rem;
    font-size: 0.9rem;
}

.github-link:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.github-link i {
    font-size: 1rem;
}

/* Стили для иконки в категории карточки */
.project-category i {
    margin-right: 0.5rem;
    font-size: 0.9rem;
}

.engineering-badge i {
    color: var(--accent-engineering);
}

.interactive-badge i {
    color: var(--accent-interactive);
}

.creative-badge i {
    color: var(--accent-creative);
}

/* Анимации */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

@keyframes modalAppear {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

@keyframes pulse {
    0% { transform: translateY(-50%) scale(1); opacity: 0.7; }
    50% { transform: translateY(-50%) scale(1.05); opacity: 1; }
    100% { transform: translateY(-50%) scale(1); opacity: 0.7; }
}

@keyframes pulse-fast {
    0% { transform: translateY(-50%) scale(1.1); }
    50% { transform: translateY(-50%) scale(1.15); }
    100% { transform: translateY(-50%) scale(1.1); }
}

.pulse {
    animation: pulse 2s infinite;
}

/* Стили для демо окон */
.demo-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2001;
    padding: 15px;
    backdrop-filter: blur(10px);
}

.demo-modal-content {
    background: rgba(18, 18, 42, 0.95);
    border-radius: 15px;
    width: 95%;
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
    border: 2px solid var(--accent-engineering);
    position: relative;
    animation: modalAppear 0.3s ease;
}

/* Стили для заголовка демо окна с иконкой */
.demo-modal-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: rgba(0, 136, 255, 0.1);
    border-bottom: 1px solid rgba(0, 136, 255, 0.2);
    border-radius: 15px 15px 0 0;
}

.demo-header-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    background: rgba(0, 136, 255, 0.2);
    color: var(--accent-engineering);
    border: 2px solid var(--accent-engineering);
    flex-shrink: 0;
}

.demo-header-text {
    flex-grow: 1;
    min-width: 0;
}

.demo-header-text h3 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.3rem;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.demo-category {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.demo-modal-close {
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition);
    flex-shrink: 0;
}

.demo-modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: rotate(90deg);
}

.demo-modal-body {
    padding: 1rem;
}

.demo-modal-footer {
    padding: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.demo-btn {
    padding: 0.6rem 1rem;
    border-radius: 20px;
    border: none;
    font-family: 'Exo 2', sans-serif;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
}

.demo-btn.primary {
    background: var(--accent-engineering-gradient);
    color: white;
}

.demo-btn.secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

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

.demo-loading {
    text-align: center;
    padding: 2rem;
}

.spinner {
    width: 32px;
    height: 32px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--accent-engineering);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

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

/* Стили для конкретных демо */
.telegram-demo {
    background: #17212b;
    border-radius: 10px;
    overflow: hidden;
}

.telegram-header {
    padding: 0.75rem;
    background: #2b5278;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.contact-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--accent-engineering-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
}

.telegram-messages {
    padding: 0.75rem;
    height: 200px;
    overflow-y: auto;
    background: #0e1621;
}

.telegram-messages::-webkit-scrollbar {
    width: 4px;
}

.telegram-messages::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

.telegram-messages::-webkit-scrollbar-thumb {
    background: #2b5278;
    border-radius: 2px;
}

.telegram-message {
    margin-bottom: 0.75rem;
    max-width: 85%;
    padding: 0.6rem 0.8rem;
    border-radius: 12px;
    position: relative;
    font-size: 0.9rem;
}

.telegram-message.bot {
    background: #2b5278;
    align-self: flex-start;
}

.telegram-message.user {
    background: #005c4b;
    align-self: flex-end;
    margin-left: auto;
}

.telegram-message-time {
    font-size: 0.7rem;
    opacity: 0.7;
    text-align: right;
    margin-top: 0.4rem;
}

.telegram-input {
    padding: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: #17212b;
}

.habit-options {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.habit-btn {
    padding: 0.6rem 0.8rem;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 8px;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
    min-width: 100px;
    font-size: 0.85rem;
}

.habit-btn:hover {
    background: var(--accent-engineering);
}

.telegram-stats {
    display: flex;
    gap: 1rem;
    padding: 0.75rem;
    background: rgba(0, 0, 0, 0.2);
    justify-content: center;
    flex-wrap: wrap;
}

.stat {
    text-align: center;
    min-width: 70px;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--accent-engineering);
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Sentiment demo */
.sentiment-demo textarea {
    width: 100%;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text-primary);
    margin: 0.75rem 0;
    resize: vertical;
    font-family: 'Exo 2', sans-serif;
    font-size: 0.9rem;
    min-height: 100px;
}

.sentiment-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    margin-top: 0.75rem;
    border-left: 4px solid;
}

.sentiment-card.positive {
    border-left-color: var(--accent-interactive);
}

.sentiment-card.negative {
    border-left-color: #ff5555;
}

.sentiment-card.neutral {
    border-left-color: #8888ff;
}

.sentiment-icon {
    font-size: 1.5rem;
}

.sentiment-info {
    flex-grow: 1;
    min-width: 0;
}

.sentiment-type {
    font-weight: 600;
    margin-bottom: 0.25rem;
    font-size: 0.95rem;
}

.sentiment-confidence {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.example-buttons {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
    flex-wrap: wrap;
}

.example-btn {
    padding: 0.4rem 0.8rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    color: var(--text-primary);
    cursor: pointer;
    font-size: 0.8rem;
    transition: var(--transition);
}

.example-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Code demo */
.code-editor textarea {
    width: 100%;
    padding: 0.75rem;
    background: #1e1e1e;
    border: 1px solid #333;
    border-radius: 8px;
    color: #d4d4d4;
    font-family: 'Courier New', monospace;
    margin: 0.75rem 0;
    resize: vertical;
    font-size: 0.9rem;
    min-height: 120px;
}

.code-improvement {
    margin-top: 0.75rem;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
}

.code-improvement pre {
    background: #1e1e1e;
    padding: 0.75rem;
    border-radius: 5px;
    overflow-x: auto;
    margin: 0.75rem 0;
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
    color: #d4d4d4;
}

.improvement-tips {
    margin-top: 0.75rem;
    padding: 0.75rem;
    background: rgba(0, 136, 255, 0.1);
    border-radius: 8px;
}

.improvement-tips h6 {
    margin-bottom: 0.5rem;
    color: var(--accent-engineering);
    font-size: 0.9rem;
}

.improvement-tips ul {
    list-style: none;
    padding-left: 0;
}

.improvement-tips li {
    margin-bottom: 0.4rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
}

/* Generic demo */
.generic-demo {
    text-align: center;
    padding: 1.5rem;
}

.generic-demo .demo-icon {
    margin-bottom: 1rem;
}

.generic-demo .demo-icon i {
    color: var(--accent-engineering);
}

.generic-demo h4 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

.generic-demo > p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.demo-features {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin: 1.5rem 0;
}

.feature {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.feature i {
    color: var(--accent-interactive);
    font-size: 0.9rem;
}

.demo-info {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 1rem;
    margin: 1.5rem 0;
    text-align: left;
}

.demo-info p {
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--accent-engineering);
    font-size: 0.95rem;
}

.demo-info ul {
    list-style: none;
    padding-left: 0;
}

.demo-info li {
    margin-bottom: 0.4rem;
    padding-left: 1.2rem;
    position: relative;
    font-size: 0.85rem;
}

.demo-info li:before {
    content: "•";
    color: var(--accent-interactive);
    position: absolute;
    left: 0;
}

/* Podcast demo */
.upload-area {
    border: 2px dashed rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    padding: 2rem;
    text-align: center;
    margin: 0.75rem 0;
    transition: var(--transition);
    cursor: pointer;
}

.upload-area:hover {
    border-color: var(--accent-engineering);
    background: rgba(0, 136, 255, 0.05);
}

.upload-area i {
    font-size: 2rem;
    color: var(--accent-engineering);
    margin-bottom: 0.75rem;
}

.sample-podcasts {
    margin-top: 1.5rem;
}

.sample-btn {
    padding: 0.6rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition);
    margin-top: 0.4rem;
    font-size: 0.9rem;
}

.sample-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.analysis-results {
    margin-top: 1.5rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.result-item {
    margin-bottom: 1rem;
}

.result-item label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.4rem;
    color: var(--accent-engineering);
    font-size: 0.95rem;
}

.transcription, .topics {
    padding: 0.75rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 5px;
    line-height: 1.4;
    font-size: 0.85rem;
}

/* Debugger demo */
.debugger-demo textarea {
    width: 100%;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text-primary);
    margin: 0.75rem 0;
    resize: vertical;
    font-family: 'Exo 2', sans-serif;
    font-size: 0.9rem;
    min-height: 100px;
}

.search-results {
    margin-top: 0.75rem;
}

.solutions-list {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 1rem;
}

.solutions-list h5 {
    margin-bottom: 0.75rem;
    color: var(--accent-engineering);
    font-size: 1rem;
}

.solutions-list ul {
    list-style: none;
    padding-left: 0;
}

.solutions-list li {
    margin-bottom: 0.75rem;
    padding: 0.75rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 5px;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.solution-number {
    background: var(--accent-engineering);
    color: white;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    flex-shrink: 0;
    margin-top: 0.1rem;
}

.solution-text {
    flex-grow: 1;
    line-height: 1.3;
    font-size: 0.85rem;
}

.common-errors {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.error-btn {
    padding: 0.4rem 0.8rem;
    margin: 0.2rem;
    background: rgba(255, 85, 85, 0.1);
    border: 1px solid rgba(255, 85, 85, 0.3);
    border-radius: 15px;
    color: #ff5555;
    cursor: pointer;
    font-size: 0.8rem;
    transition: var(--transition);
}

.error-btn:hover {
    background: rgba(255, 85, 85, 0.2);
}

/* Адаптивность */
@media (max-width: 1200px) {
    .lab-content {
        grid-template-columns: 1fr;
        height: auto;
        max-height: none;
    }
    
    .about-content,
    .contact-content {
        grid-template-columns: 1fr;
    }
    
    .video-scene-container {
        height: 350px;
    }
    
    .cluster-info {
        max-height: none;
    }
}

@media (max-width: 992px) {
    .projects-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
}

/* ============================================
   МОБИЛЬНАЯ ВЕРСИЯ (до 768px)
   ============================================ */
@media (max-width: 768px) {
    /* Шапка для мобильных */
    .header {
        flex-direction: column;
        padding: 1rem;
        gap: 1rem;
        position: relative;
    }
    
    .logo h1 {
        font-size: 2rem;
        text-align: center;
    }
    
    .logo .subtitle {
        text-align: center;
        font-size: 0.8rem;
    }
    
    .nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem;
    }
    
    .nav-link {
        margin: 0.25rem;
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
        border-radius: 20px;
    }
    
    .user-type-selector {
        margin-top: 0.5rem;
    }
    
    .main-content {
        margin-top: 160px;
        padding-bottom: 1rem;
    }
    
    .section {
        padding: 1rem;
    }
    
    .section-header {
        margin-bottom: 2rem;
    }
    
    .section-header h2 {
        font-size: 2rem;
    }
    
    .section-header p {
        font-size: 1rem;
    }
    
    /* Лаборатория для мобильных */
    .lab-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        height: auto;
    }
    
    .video-scene-container {
        height: 250px;
        border-radius: 15px;
    }
    
    .clickable-sphere {
        width: 80px;
        height: 80px;
        top: 50%;
        transform: translateY(-50%);
    }
    
    .sphere-inner {
        width: 50%;
        height: 50%;
        font-size: 1.5rem;
    }
    
    .sphere-label {
        font-size: 0.8rem;
        font-weight: 500;
        margin-top: 10px;
        white-space: normal;
        width: 100px;
        text-align: center;
    }
    
    .sphere-engineering {
        left: 5%;
    }
    
    .sphere-interactive {
        left: 35%;
    }
    
    .sphere-creative {
        left: 65%;
    }
    
    .typing-text {
        animation: none !important;
        border-right: none !important;
        width: auto !important;
    }
    
    .sphere-instruction {
        display: none;
    }
    
    .scene-controls {
        bottom: 10px;
        right: 10px;
        gap: 5px;
    }
    
    .scene-controls button {
        padding: 8px 15px;
        font-size: 0.9rem;
    }
    
    .cluster-info {
        padding: 1.5rem;
        border-radius: 15px;
    }
    
    .cluster-info h3 {
        font-size: 1.5rem;
    }
    
    .detail-item {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .detail-item h4 {
        font-size: 1.2rem;
    }
    
    /* Проекты для мобильных */
    .category-filters {
        flex-direction: column;
        align-items: center;
        gap: 0.75rem;
    }
    
    .filter-btn {
        width: 100%;
        max-width: 250px;
        padding: 0.6rem 1rem;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        margin-top: 1.5rem;
    }
    
    .project-card {
        border-radius: 15px;
    }
    
    .project-icon-wrapper {
        height: 150px;
    }
    
    .project-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .project-info {
        padding: 1.2rem;
    }
    
    .project-info h3 {
        font-size: 1.3rem;
    }
    
    .project-actions {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .btn {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }
    
    /* Об авторе для мобильных */
    .about-content {
        gap: 1.5rem;
    }
    
    .author-card {
        padding: 1.5rem;
        border-radius: 15px;
    }
    
    .author-avatar {
        font-size: 4rem;
    }
    
    .author-info h3 {
        font-size: 1.5rem;
    }
    
    .author-title {
        font-size: 1rem;
    }
    
    .skills-container {
        padding: 1.5rem;
        border-radius: 15px;
    }
    
    .skills-container h3 {
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .skill-category h4 {
        font-size: 1.2rem;
    }
    
    .skill-tags {
        gap: 0.5rem;
    }
    
    .skill-tag {
        padding: 0.4rem 0.8rem;
        font-size: 0.9rem;
    }
    
    /* Контакты для мобильных */
    .contact-content {
        gap: 1.5rem;
    }
    
    .contact-info, .contact-form {
        padding: 1.5rem;
        border-radius: 15px;
    }
    
    .contact-info h3, .contact-form h3 {
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }
    
    .form-group {
        margin-bottom: 1rem;
    }
    
    .form-group input,
    .form-group textarea {
        padding: 0.75rem;
        font-size: 0.9rem;
    }
    
    .submit-btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
    }
    
    /* Голосовой помощник для мобильных */
    .voice-assistant {
        position: fixed;
        bottom: 10px;
        right: 10px;
        left: 10px;
        width: auto;
        max-width: none;
        max-height: 400px;
        border-radius: 15px;
    }
    
    .voice-assistant.collapsed {
        height: 50px;
    }
    
    .assistant-header {
        padding: 0.5rem 0.75rem;
        min-height: 50px;
    }
    
    .assistant-avatar {
        font-size: 1.2rem;
        margin-right: 0.5rem;
        min-width: 32px;
    }
    
    .assistant-info h3 {
        font-size: 0.9rem;
    }
    
    .assistant-status {
        font-size: 0.7rem;
    }
    
    .assistant-controls button {
        width: 28px;
        height: 28px;
        font-size: 0.8rem;
    }
    
    .assistant-body {
        max-height: 250px;
        padding: 0.5rem;
    }
    
    .chat-messages {
        height: 120px;
        margin-bottom: 0.5rem;
    }
    
    .message-content {
        padding: 8px;
        font-size: 0.85rem;
    }
    
    .message-avatar {
        width: 26px;
        height: 26px;
        font-size: 0.8rem;
    }
    
    .message-time {
        font-size: 0.65rem;
    }
    
    .chat-input-container {
        margin-bottom: 0.5rem;
    }
    
    .chat-input-container input {
        padding: 0.4rem 0.6rem;
        font-size: 0.85rem;
    }
    
    .voice-btn,
    .send-btn {
        width: 32px;
        height: 32px;
        font-size: 0.8rem;
    }
    
    .chat-suggestions {
        padding: 6px;
    }
    
    .chat-suggestions p {
        font-size: 0.75rem;
        margin-bottom: 4px;
    }
    
    .suggestion-btn {
        padding: 3px 6px;
        font-size: 0.7rem;
        margin: 0 3px 3px 0;
    }
    
    /* Футер для мобильных */
    .footer {
        padding: 1.2rem;
        font-size: 0.85rem;
    }
    
    /* Модальные окна для мобильных */
    .modal-content {
        padding: 1.2rem;
        border-radius: 12px;
    }
    
    .close-modal {
        top: 0.5rem;
        right: 0.5rem;
        font-size: 1.3rem;
        width: 28px;
        height: 28px;
    }
    
    .project-details h2 {
        font-size: 1.5rem;
    }
    
    .project-category-header {
        gap: 0.75rem;
        margin-bottom: 1rem;
    }
    
    .project-category-icon {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    
    .project-details h3 {
        font-size: 1.1rem;
    }
    
    .github-link {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }
    
    /* Демо окна для мобильных */
    .demo-modal-content {
        width: 98%;
        margin: 0.5rem;
    }
    
    .demo-modal-header {
        flex-wrap: wrap;
    }
    
    .demo-header-icon {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }
    
    .demo-header-text h3 {
        font-size: 1.1rem;
    }
    
    .demo-modal-body {
        padding: 0.75rem;
    }
    
    .demo-modal-footer {
        padding: 0.75rem;
        gap: 0.5rem;
    }
    
    .demo-btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.85rem;
    }
    
    /* Демо проекты */
    .telegram-messages {
        height: 150px;
    }
    
    .telegram-message {
        font-size: 0.85rem;
        padding: 0.5rem 0.6rem;
    }
    
    .habit-options {
        flex-direction: column;
    }
    
    .habit-btn {
        min-width: 100%;
        margin-bottom: 5px;
    }
    
    .telegram-stats {
        gap: 1rem;
    }
    
    .stat {
        min-width: 60px;
    }
    
    .stat-value {
        font-size: 1.2rem;
    }
    
    .upload-area {
        padding: 1.5rem;
    }
    
    .upload-area i {
        font-size: 1.8rem;
    }
}

/* ============================================
   МАЛЕНЬКИЕ СМАРТФОНЫ (до 480px)
   ============================================ */
@media (max-width: 480px) {
    .logo h1 {
        font-size: 1.8rem;
    }
    
    .nav ul {
        gap: 0.25rem;
    }
    
    .nav-link {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }
    
    .main-content {
        margin-top: 180px;
    }
    
    .section-header h2 {
        font-size: 1.8rem;
    }
    
    /* Лаборатория для маленьких экранов */
    .video-scene-container {
        height: 200px;
    }
    
    .clickable-sphere {
        width: 70px;
        height: 70px;
    }
    
    .sphere-inner {
        font-size: 1.2rem;
    }
    
    .sphere-label {
        font-size: 0.7rem;
        width: 80px;
    }
    
    .sphere-engineering {
        left: 3%;
    }
    
    .sphere-interactive {
        left: 35%;
    }
    
    .sphere-creative {
        left: 67%;
    }
    
    .cluster-info h3 {
        font-size: 1.3rem;
    }
    
    /* Проекты для маленьких экранов */
    .projects-grid {
        gap: 1rem;
    }
    
    .project-icon-wrapper {
        height: 120px;
    }
    
    .project-icon {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    .project-info h3 {
        font-size: 1.2rem;
    }
    
    .project-info > p {
        font-size: 0.9rem;
    }
    
    /* Голосовой помощник для маленьких экранов */
    .voice-assistant {
        bottom: 5px;
        right: 5px;
        left: 5px;
        max-height: 350px;
    }
    
    .assistant-header {
        padding: 0.4rem 0.5rem;
    }
    
    .assistant-info h3 {
        font-size: 0.85rem;
    }
    
    .assistant-status {
        font-size: 0.65rem;
    }
    
    .chat-messages {
        height: 100px;
    }
    
    .message-content {
        font-size: 0.8rem;
        padding: 6px;
    }
    
    .message-avatar {
        width: 24px;
        height: 24px;
        font-size: 0.75rem;
    }
    
    .chat-suggestions .suggestion-btn {
        font-size: 0.65rem;
        padding: 2px 5px;
    }
    
    /* Примеры кнопок в демо */
    .example-buttons {
        flex-direction: column;
    }
    
    .example-btn {
        min-width: 100%;
        margin-bottom: 5px;
    }
}

/* Уведомления */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 1rem 1.5rem;
    background: var(--accent-interactive);
    color: white;
    border-radius: 10px;
    z-index: 10000;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    animation: slideInRight 0.3s ease;
}

.notification.error {
    background: #ff5555;
}

@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideOutRight {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(100%); opacity: 0; }
}

/* Прочие элементы */
.loading {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
}

.loading i {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--accent-engineering);
}

.no-projects {
    text-align: center;
    padding: 3rem;
    color: var(--text-muted);
    font-size: 1.2rem;
    grid-column: 1 / -1;
}

/* Улучшения для доступности */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

:focus {
    outline: 2px solid var(--accent-engineering);
    outline-offset: 2px;
}

button:focus {
    outline: 2px solid var(--accent-engineering);
    outline-offset: 2px;
}

/* Кастомный скроллбар */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--accent-engineering);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-interactive);
}

/* Стили для обложки-прелоадера */
.splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0a0a1a 0%, #12122a 50%, #1a1a2e 100%);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Courier Prime', monospace, 'Orbitron', sans-serif;
    overflow: hidden;
}

.splash-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.30;
   filter: 
        /* Настройки цвета */
        sepia(0.5) 
        hue-rotate(165deg) 
        saturate(3)
        
        /* Яркость и контраст */
        brightness(0.65) 
        contrast(1.7)
        
        /* Дополнительные эффекты */
        invert(0.05);
    z-index: 0;
}

.splash-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 800px;
    padding: 2rem;
    background: rgba(10, 10, 26, 0.8);
    border-radius: 20px;
    border: 2px solid var(--accent-engineering);
    box-shadow: 
        0 0 50px rgba(0, 136, 255, 0.5),
        inset 0 0 30px rgba(0, 136, 255, 0.1);
    backdrop-filter: blur(10px);
    animation: splashPulse 4s infinite alternate;
}

@keyframes splashPulse {
    0% { box-shadow: 0 0 50px rgba(0, 136, 255, 0.5), inset 0 0 30px rgba(0, 136, 255, 0.1); }
    100% { box-shadow: 0 0 70px rgba(0, 136, 255, 0.7), inset 0 0 40px rgba(0, 136, 255, 0.2); }
}

.splash-logo {
    margin-bottom: 2.5rem;
}

.logo-image {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 4px solid var(--accent-engineering);
    padding: 10px;
    background: rgba(0, 136, 255, 0.1);
    box-shadow: 
        0 0 30px rgba(0, 136, 255, 0.6),
        inset 0 0 20px rgba(0, 136, 255, 0.3);
    margin-bottom: 1rem;
    animation: logoGlow 3s infinite alternate;
}

@keyframes logoGlow {
    0% { box-shadow: 0 0 30px rgba(0, 136, 255, 0.6), inset 0 0 20px rgba(0, 136, 255, 0.3); }
    100% { box-shadow: 0 0 50px rgba(0, 136, 255, 0.8), inset 0 0 30px rgba(0, 136, 255, 0.5); }
}

.splash-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 3.5rem;
    font-weight: 900;
    background: var(--accent-engineering-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 0 20px rgba(0, 136, 255, 0.7);
    letter-spacing: 2px;
    margin: 0;
}

.terminal-output {
    background: rgba(0, 0, 0, 0.7);
    border-radius: 10px;
    padding: 2rem;
    margin: 2rem auto;
    text-align: left;
    border: 1px solid rgba(0, 136, 255, 0.3);
    max-width: 600px;
    position: relative;
    overflow: hidden;
    min-height: 200px;
}

.terminal-output::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent, 
        var(--accent-engineering), 
        var(--accent-interactive),
        var(--accent-creative),
        transparent
    );
    animation: scanline 4s linear infinite;
}

@keyframes scanline {
    0% { top: 0; }
    100% { top: 100%; }
}

.terminal-line {
    font-family: 'Courier Prime', monospace;
    font-size: 1.2rem;
    color: #00ff88;
    margin-bottom: 1rem;
    opacity: 0;
    transform: translateX(-20px);
    animation: typeLine 0.5s forwards;
    text-shadow: 0 0 5px #00ff88;
    line-height: 1.5;
    display: flex;
    align-items: center;
}

.terminal-line::before {
    content: '>';
    color: var(--accent-engineering);
    margin-right: 10px;
    font-weight: bold;
}

.loading-bar {
    display: inline-block;
    width: 0;
    height: 20px;
    background: linear-gradient(90deg, 
        var(--accent-engineering), 
        var(--accent-interactive)
    );
    border-radius: 3px;
    margin-left: 10px;
    vertical-align: middle;
    position: relative;
    overflow: hidden;
}

.loading-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, 
        transparent,
        rgba(255, 255, 255, 0.4),
        transparent
    );
    animation: loadingShimmer 1.5s infinite;
}

@keyframes loadingShimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

@keyframes typeLine {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.activate-btn {
    background: linear-gradient(135deg, 
        var(--accent-engineering) 0%,
        var(--accent-interactive) 100%
    );
    border: none;
    border-radius: 50px;
    padding: 1.5rem 3rem;
    color: white;
    font-family: 'Orbitron', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 1px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    margin: 2rem auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    min-width: 300px;
}

.activate-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: linear-gradient(135deg, 
        #666 0%,
        #888 100%
    );
}

.activate-btn:not(:disabled):hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 
        0 10px 30px rgba(0, 136, 255, 0.5),
        0 0 50px rgba(0, 255, 136, 0.3);
}

.activate-btn:not(:disabled):active {
    transform: translateY(-2px) scale(1.02);
}

.activate-btn i {
    font-size: 1.5rem;
    animation: powerPulse 2s infinite;
}

@keyframes powerPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.8; }
}

.btn-glow {
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(135deg, 
        var(--accent-engineering),
        var(--accent-interactive),
        var(--accent-creative),
        var(--accent-engineering)
    );
    border-radius: 52px;
    z-index: -1;
    opacity: 0;
    animation: btnGlow 3s infinite;
}

@keyframes btnGlow {
    0%, 100% { opacity: 0; filter: blur(5px); }
    50% { opacity: 0.7; filter: blur(10px); }
}

.sound-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 1rem;
    opacity: 0.8;
}

.sound-indicator i {
    color: var(--accent-interactive);
    animation: soundWave 2s infinite;
}

@keyframes soundWave {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

/* Анимация исчезновения обложки */
.splash-screen.fade-out {
    animation: fadeOut 1.5s forwards;
}

@keyframes fadeOut {
    0% { opacity: 1; }
    100% { 
        opacity: 0; 
        visibility: hidden;
        display: none;
    }
}

/* Стили для обложки-прелоадера на мобильных */
@media (max-width: 768px) {
    .splash-content {
        padding: 1.5rem;
        margin: 1rem;
        width: calc(100% - 2rem);
    }
    
    .splash-title {
        font-size: 2.5rem;
    }
    
    .logo-image {
        width: 120px;
        height: 120px;
    }
    
    .terminal-output {
        padding: 1.5rem;
        min-height: 150px;
    }
    
    .terminal-line {
        font-size: 1rem;
    }
    
    .activate-btn {
        min-width: 250px;
        padding: 1.2rem 2rem;
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .splash-title {
        font-size: 2rem;
    }
    
    .logo-image {
        width: 100px;
        height: 100px;
    }
    
    .terminal-output {
        padding: 1rem;
        min-height: 120px;
    }
    
    .terminal-line {
        font-size: 0.9rem;
    }
    
    .activate-btn {
        min-width: 200px;
        padding: 1rem 1.5rem;
        font-size: 1rem;
    }
}