/* Общие стили */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    scroll-behavior: smooth;
    font-family: 'Fira Code', 'Courier New', monospace;
    color: #e0e0e0;
    background-color: #1a1a1a;
    line-height: 1.6;
}

body {
    padding-top: 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 30px;
}

/* Синтаксическая подсветка */
.keyword { color: #569cd6; }
.function { color: #dcdcaa; }
.string { color: #ce9178; }
.comment { color: #6a9955; }
.number { color: #b5cea8; }
.operator { color: #d4d4d4; }
.variable { color: #9cdcfe; }
.type { color: #4ec9b0; }

/* Шапка */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(30, 30, 30, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #333;
    transition: all 0.3s ease;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 40px;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    margin-right: 30px;
}

.logo-image {
    width: 60px;
    height: 60px;
    object-fit: contain;
    transition: transform 0.3s ease;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.3));
}

.logo:hover .logo-image {
    transform: scale(1.1);
    filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.5));
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 40px;
}

.nav-links a {
    text-decoration: none;
    color: #e0e0e0;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    font-size: 0.95rem;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: #569cd6;
    transition: width 0.3s ease;
}

.nav-links a:hover {
    color: #569cd6;
}

.nav-links a:hover::after {
    width: 100%;
}

/* Бургер-меню */
.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 5px;
    z-index: 1001;
}

.menu-toggle .bar {
    width: 25px;
    height: 3px;
    background-color: #e0e0e0;
    margin: 3px 0;
    transition: 0.4s;
    border-radius: 2px;
}

.menu-toggle.active .bar:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.menu-toggle.active .bar:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active .bar:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
}

/* Баннер на весь экран */
.hero {
    height: 100vh;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0d0d0d 0%, #1a1a1a 50%, #2d2d2d 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(86, 156, 214, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(220, 220, 170, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(206, 145, 120, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

.code-editor {
    position: relative;
    width: 100%;
    height: 100%;
    background: #1e1e1e;
    border: 1px solid #333;
    display: flex;
    flex-direction: column;
}

.code-header {
    background: #2d2d2d;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #3e3e3e;
}

.code-dots {
    display: flex;
    gap: 8px;
}

.dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
}

.dot.red { background: #ff5f56; }
.dot.yellow { background: #ffbd2e; }
.dot.green { background: #27ca3f; }

.file-name {
    color: #e0e0e0;
    font-size: 0.9rem;
    opacity: 0.8;
}

.hero-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 40px 20px;
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: 3.5rem;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #569cd6, #dcdcaa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

.hero-text {
    font-size: 1.3rem;
    margin-bottom: 30px;
    color: #cccccc;
    opacity: 0.9;
    max-width: 600px;
}

.btn.hero-button {
    background: linear-gradient(135deg, #569cd6, #4ec9b0);
    color: #1a1a1a;
    border: none;
    padding: 15px 35px;
    font-size: 1.1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    text-decoration: none;
    font-weight: 600;
    font-family: 'Fira Code', monospace;
    box-shadow: 0 4px 15px rgba(86, 156, 214, 0.3);
}

.btn.hero-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(86, 156, 214, 0.4);
}

.code-lines {
    padding: 30px;
    font-size: 16px;
    line-height: 1.6;
    color: #e0e0e0;
    text-align: left;
    max-width: 700px;
    margin: 0 auto;
    background: rgba(30, 30, 30, 0.8);
    border-radius: 8px;
    border: 1px solid #333;
}

.line {
    margin-bottom: 10px;
    opacity: 0;
    animation: typeLine 0.3s ease forwards;
}

.line:nth-child(1) { animation-delay: 0.2s; }
.line:nth-child(2) { animation-delay: 0.4s; }
.line:nth-child(3) { animation-delay: 0.6s; }
.line:nth-child(4) { animation-delay: 0.8s; }
.line:nth-child(5) { animation-delay: 1.0s; }
.line:nth-child(6) { animation-delay: 1.2s; }
.line:nth-child(7) { animation-delay: 1.4s; }

@keyframes typeLine {
    to {
        opacity: 1;
    }
}

/* Секции */
.section {
    padding: 100px 0;
    background: #1a1a1a;
    border-bottom: 1px solid #333;
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 60px;
    color: #e0e0e0;
    background: linear-gradient(135deg, #569cd6, #dcdcaa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Секция "О студии" */
.about-content {
    max-width: 1100px;
    margin: 0 auto;
}

.about-main {
    background: #2d2d2d;
    border-radius: 12px;
    padding: 40px;
    border: 1px solid #3e3e3e;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.about-layout {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 40px;
    align-items: start;
}

.about-text-block {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.about-text {
    font-size: 1.1rem;
    color: #cccccc;
    line-height: 1.7;
}

.about-code-side {
    background: rgba(30, 30, 30, 0.8);
    border-radius: 8px;
    padding: 25px;
    border: 1px solid #333;
    height: fit-content;
    position: sticky;
    top: 20px;
}

.about-code-side .code-lines {
    margin: 0;
    background: transparent;
    border: none;
    padding: 0;
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .about-main {
        padding: 30px 25px;
    }
    
    .about-layout {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .about-text {
        font-size: 1rem;
        line-height: 1.6;
    }
    
    .about-code-side {
        position: static;
        padding: 20px;
    }
    
    .about-code-side .code-lines {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .about-main {
        padding: 25px 20px;
    }
    
    .about-layout {
        gap: 25px;
    }
    
    .about-code-side {
        padding: 15px;
    }
    
    .about-code-side .code-lines {
        font-size: 13px;
    }
}
/* Секция "Команда" */
.team-section {
    background: linear-gradient(135deg, #0d0d0d 0%, #1a1a1a 100%);
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.team-member {
    background: #2d2d2d;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #3e3e3e;
    transition: all 0.3s ease;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.team-member:hover {
    transform: translateY(-8px);
    border-color: #569cd6;
    box-shadow: 0 12px 40px rgba(86, 156, 214, 0.3);
}

.team-photo {
    width: 100%;
    height: 280px;
    object-fit: cover;
    border-bottom: 1px solid #3e3e3e;
    transition: transform 0.3s ease;
}

.team-member:hover .team-photo {
    transform: scale(1.05);
}

.member-info {
    padding: 30px 25px;
    text-align: center;
}

.member-name {
    font-size: 1.4rem;
    color: #e0e0e0;
    margin-bottom: 10px;
    font-weight: 600;
}

.member-role {
    font-size: 1rem;
    color: #569cd6;
    margin-bottom: 15px;
    font-weight: 500;
}

.member-bio {
    font-size: 0.95rem;
    color: #cccccc;
    line-height: 1.6;
    margin-bottom: 20px;
}

.telegram-link {
    display: inline-block;
    font-size: 0.9rem;
    color: #569cd6;
    text-decoration: none;
    padding: 10px 20px;
    border: 1px solid #569cd6;
    border-radius: 20px;
    transition: all 0.3s ease;
    background: transparent;
}

.telegram-link:hover {
    background: #569cd6;
    color: #1a1a1a;
    transform: translateY(-2px);
}

/* Секция "Достижения" */
.achievement-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    text-align: center;
    margin-top: 30px;
}

.achievement-card {
    background: #2d2d2d;
    border-radius: 12px;
    padding: 40px 30px;
    border: 1px solid #3e3e3e;
    transition: all 0.3s ease;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.achievement-card:hover {
    transform: translateY(-5px);
    border-color: #569cd6;
}

.achievement-card h3 {
    font-size: 2.5rem;
    margin-bottom: 15px;
    color: #569cd6;
    font-weight: 700;
}

.achievement-card p {
    font-size: 1.1rem;
    color: #cccccc;
    line-height: 1.5;
}

/* Секция "Проекты" */
.projects-section {
    background: linear-gradient(135deg, #1a1a1a 0%, #0d0d0d 100%);
    margin-bottom: 0;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.project-card {
    background: #2d2d2d;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #3e3e3e;
    transition: all 0.3s ease;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.project-card:hover {
    transform: translateY(-8px);
    border-color: #569cd6;
    box-shadow: 0 12px 40px rgba(86, 156, 214, 0.3);
}

.project-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-bottom: 1px solid #3e3e3e;
    transition: transform 0.3s ease;
}

.project-card:hover .project-image {
    transform: scale(1.05);
}

.project-content {
    padding: 25px;
}

.project-title {
    font-size: 1.3rem;
    color: #e0e0e0;
    margin-bottom: 12px;
    font-weight: 600;
}

.project-desc {
    font-size: 0.95rem;
    color: #cccccc;
    margin-bottom: 15px;
    line-height: 1.6;
}

.project-award {
    font-size: 0.9rem;
    color: #dcdcaa;
    margin-bottom: 20px;
    font-style: italic;
}

.btn-detail {
    display: inline-block;
    padding: 10px 20px;
    font-size: 0.9rem;
    background: transparent;
    color: #569cd6;
    border: 1px solid #569cd6;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    font-family: 'Fira Code', monospace;
}

.btn-detail:hover {
    background: #569cd6;
    color: #1a1a1a;
    transform: translateY(-2px);
}

.text-center {
    text-align: center;
    margin-top: 50px;
}

#toggle-projects-btn {
    padding: 15px 30px;
    font-size: 1rem;
    background: transparent;
    color: #569cd6;
    border: 1px solid #569cd6;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Fira Code', monospace;
}

#toggle-projects-btn:hover {
    background: #569cd6;
    color: #1a1a1a;
    transform: translateY(-2px);
}

/* Модальное окно */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.8);
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background-color: #2d2d2d;
    margin: 5% auto;
    padding: 40px;
    border-radius: 12px;
    width: 90%;
    max-width: 800px;
    border: 1px solid #3e3e3e;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-body {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.modal-image {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #3e3e3e;
}

.modal-title {
    font-size: 1.8rem;
    color: #e0e0e0;
    background: linear-gradient(135deg, #569cd6, #dcdcaa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
}

.modal-description {
    color: #cccccc;
    font-size: 1.1rem;
    margin-bottom: 15px;
    line-height: 1.6;
}

.modal-award {
    color: #dcdcaa;
    font-style: italic;
    font-size: 1rem;
    margin-bottom: 20px;
}

.modal-details {
    font-size: 1rem;
    color: #e0e0e0;
    line-height: 1.6;
}

/* Стили для HTML-контента в модальном окне */
.modal-details ul {
    margin: 15px 0;
    padding-left: 20px;
}

.modal-details li {
    margin-bottom: 8px;
    color: #cccccc;
}

.modal-details strong {
    color: #569cd6;
    font-weight: 600;
}

.modal-details p {
    margin-bottom: 15px;
    color: #e0e0e0;
}

.modal-details a:not(.project-link) {
    color: #4ec9b0;
    text-decoration: none;
    transition: color 0.3s ease;
    border-bottom: 1px solid #4ec9b0;
    padding-bottom: 1px;
}

.modal-details a:not(.project-link):hover {
    color: #569cd6;
    border-bottom-color: #569cd6;
}

/* Стили для ссылок проектов */
.project-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 25px;
    padding-top: 25px;
    border-top: 1px solid #3e3e3e;
}

.project-link {
    display: inline-block;
    padding: 12px 20px;
    background: linear-gradient(135deg, #569cd6, #4ec9b0);
    color: #1a1a1a !important;
    text-decoration: none !important;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
    font-family: 'Fira Code', monospace;
    border: 1px solid transparent;
    box-shadow: 0 2px 8px rgba(86, 156, 214, 0.3);
}

.project-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(86, 156, 214, 0.4);
    background: linear-gradient(135deg, #4ec9b0, #569cd6);
    color: #1a1a1a !important;
    text-decoration: none !important;
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 2rem;
    color: #e0e0e0;
    cursor: pointer;
    transition: color 0.3s ease;
    background: none;
    border: none;
    z-index: 1001;
}

.close-btn:hover {
    color: #ff5f56;
}

/* Подвал */
.footer {
    background: #0d0d0d;
    color: #e0e0e0;
    padding: 80px 0 0;
    border-top: 1px solid #333;
    margin-bottom: 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 50px;
    margin-bottom: 50px;
}

.footer-col {
    display: flex;
    flex-direction: column;
}

.footer-title {
    font-size: 1.3rem;
    margin-bottom: 25px;
    color: #e0e0e0;
    background: linear-gradient(135deg, #569cd6, #dcdcaa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-text {
    font-size: 0.95rem;
    color: #cccccc;
    margin-bottom: 15px;
    line-height: 1.6;
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    text-decoration: none;
    color: #cccccc;
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #569cd6;
}

.footer-bottom {
    border-top: 1px solid #333;
    padding-top: 30px;
    padding-bottom: 30px;
    text-align: center;
    margin-bottom: 0;
}

.copyright {
    font-size: 0.9rem;
    color: #999;
    margin: 0;
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .container {
        padding: 0 20px;
    }

    .navbar {
        padding: 15px 20px;
    }

    .menu-toggle {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background: #2d2d2d;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        padding-top: 100px;
        transition: right 0.3s ease-in-out;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.3);
        z-index: 1000;
        border-left: 1px solid #333;
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links li {
        margin: 15px 0;
        width: 100%;
        text-align: center;
    }

    .nav-links a {
        display: block;
        padding: 15px 20px;
        font-size: 1.1rem;
        border-bottom: 1px solid #333;
    }

    .nav-links a::after {
        display: none;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-text {
        font-size: 1.1rem;
        padding: 0 20px;
    }

    .btn.hero-button {
        padding: 12px 25px;
        font-size: 1rem;
    }

    .code-lines {
        font-size: 14px;
        padding: 20px;
        margin: 0 20px;
    }

    .section {
        padding: 60px 0;
    }

    .section-title {
        font-size: 2rem;
        margin-bottom: 40px;
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .about-text-block {
        padding: 30px 25px;
    }

    .about-image {
        order: -1;
    }

    .team-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .achievement-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .project-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .modal-content {
        margin: 10% auto;
        padding: 30px 25px;
    }

    .modal-image {
        height: 200px;
    }

    .project-links {
        flex-direction: column;
        gap: 10px;
    }

    .project-link {
        text-align: center;
        padding: 14px 20px;
    }

    .modal-title {
        font-size: 1.5rem;
    }

    .logo-image {
        width: 50px;
        height: 50px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-text {
        font-size: 1rem;
    }

    .code-lines {
        font-size: 12px;
        padding: 15px;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .about-text-block {
        padding: 25px 20px;
    }

    .member-info {
        padding: 25px 20px;
    }

    .project-content {
        padding: 20px;
    }

    .modal-content {
        padding: 20px 15px;
    }
}

/* Исправление лишнего пространства после подвала */
html, body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

body {
    padding-bottom: 0;
}