/* Основные стили */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    outline: none;
    -webkit-tap-highlight-color: transparent;
    font-family: 'Ubuntu';
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    overflow-y: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
    background: transparent;
}

body {
    min-height: 100vh;
    position: relative;
    font-family: 'Ubuntu';
    background: transparent;
}

/* Остальные стили */
html, body {
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

html::-webkit-scrollbar, body::-webkit-scrollbar {
    display: none;
}

html {
    background: transparent;
}

body {
    font-family: 'Ubuntu';
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    transition: all 0.5s cubic-bezier(.4,2,.6,1);
    position: relative;
    z-index: 1;
    width: 100%;
}

body.dark-theme h1,
body.dark-theme h2,
body.dark-theme nav a,
body.dark-theme .home-link {
    color: #fff;
    text-shadow: none;
}

body.dark-theme .hero-text,
body.dark-theme .carousel .card,
body.dark-theme .work-with-us-block,
body.dark-theme .service-block {
    border: 1px solid #181818;
}

[data-theme="dark"] html,
[data-theme="dark"] body {
    background: linear-gradient(135deg, #0a0a1a 0%, #0d1117 50%, #0a0a1a 100%);
}

body h1,
body h2,
body nav a,
body .home-link {
    color: #ffffff;
    text-shadow: none;
}

body .theme-toggle svg {
    stroke: #666;
}

body .service-block,
body .customer-block,
body .team-block,
body .work-with-us-block,
body .hero-text {
    position: relative;
    padding: 30px;
    border-radius: 30px;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    display: flex; 
    flex-direction: column;
    align-items: center;
    text-align: left;
    overflow: hidden;
    background-color: transparent;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

[data-theme="dark"] body h1,
[data-theme="dark"] body h2,
[data-theme="dark"] body nav a,
[data-theme="dark"] body .home-link {
    color: #fff;
    text-shadow: none;
}

[data-theme="dark"] body .hero-text,
[data-theme="dark"] body .carousel .card,
[data-theme="dark"] body .work-with-us-block,
[data-theme="dark"] body .service-block {
    border: 1px solid rgba(255, 255, 255, 0.1);
}

[data-theme="light"] body .hero-text,
[data-theme="light"] body .carousel .card,
[data-theme="light"] body .work-with-us-block,
[data-theme="light"] body .service-block {
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.container {
    width: 1081px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 20px;
    position: relative;
    z-index: 2;
}

.container > * {
    opacity: 0;
    animation: fadeIn 1s ease forwards;
    position: relative;
    z-index: 1;
}

.container > *:nth-child(1) { animation-delay: 0.2s; }
.container > *:nth-child(2) { animation-delay: 0.4s; }
.container > *:nth-child(3) { animation-delay: 0.6s; }
.container > *:nth-child(4) { animation-delay: 0.8s; }
.container > *:nth-child(5) { animation-delay: 1s; }

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

a, button, input, textarea {
    outline: none;
}

@font-face {
    font-family: 'Ubuntu';
    src: url('./../fonts/Ubuntu-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'Ubuntu';
    src: url('./../fonts/Ubuntu-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
}

@font-face {
    font-family: 'Ubuntu Mono';
    src: url('./../fonts/Ubuntu-Mono-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
}

body, header, footer, .hero, .hero-text, .customers-block, .team-block, .team-member, .work-with-us-block {
    transition: color 0.3s ease;
}

.customers-block, .team-block, .work-with-us-block, footer {
    transition: all 0.3s ease;
}

.team-block, .team-member, .team-overlay, .team-hacker {
    transition: all 0.3s ease;
}

h1, h2, nav a, .home-link, .hero h1, .hero-subtitle, .hero-description, .service-title, .service-desc, .footer-copyright, .customers-block h2, .team-block h2, .work-with-us-block h2, .team-member h3, .team-member p {
    transition: color 0.3s ease;
}

/* Dark theme support */
@media (prefers-color-scheme: dark) {
    :root {
        --text-color: #ffffff;
        --bg-color: #0f0f1a;
        --accent-color: #ffffff;
    }
}

/* Print styles */
@media print {
    body {
        background: white;
        color: black;
    }

    .splash-screen,
    .services-modal-backdrop,
    .service-modal {
        display: none !important;
    }

    .container {
        width: 100%;
        margin: 0;
        padding: 0;
    }

    a {
        text-decoration: none;
        color: black;
    }

    img {
        max-width: 100% !important;
    }
}

/* Additional responsive breakpoints */
@media (max-width: 1200px) {
    .container {
        padding: 0 20px;
    }
}

@media (max-width: 768px) {
    :root {
        --font-size-base: 14px;
    }
}

@media (max-width: 480px) {
    :root {
        --font-size-base: 12px;
    }
}

@keyframes parallaxDark {
    0% {
        background-position: 0% 0%;
    }
    25% {
        background-position: 100% 0%;
    }
    50% {
        background-position: 100% 100%;
    }
    75% {
        background-position: 0% 100%;
    }
    100% {
        background-position: 0% 0%;
    }
}

.hero {
    position: relative;
    width: 1081px;
    height: 790px;
    opacity: 0;
    animation: fadeIn 1.6s ease-in-out 1s forwards;
    border-radius: 30px;
    margin-top: 150px;
    margin-bottom: 50px;
    overflow: hidden;
    transition: all 0.3s ease;
    background: transparent;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.hero::-webkit-scrollbar {
    display: none;
}

.hero-content {
    width: 100%;
    height: 100%;
    position: relative;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.hero-content::-webkit-scrollbar {
    display: none;
}

.story-content::-webkit-scrollbar {
    width: 8px;
}

.story-content::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
}

.story-content::-webkit-scrollbar-thumb {
    background: rgba(102, 102, 102, 0.5);
    border-radius: 4px;
}

.story-content::-webkit-scrollbar-thumb:hover {
    background: rgba(102, 102, 102, 0.7);
}

.story-content {
    scrollbar-width: thin;
    scrollbar-color: rgba(102, 102, 102, 0.5) rgba(0, 0, 0, 0.1);
}

.splash-screen .hero-text {
    position: absolute;
    bottom: 50px;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    height: 200px;
}

.terminal-scroll {
    width: 100%;
    height: 100%;
    overflow-y: auto;
    padding-right: 10px;
    text-align: left;
}

.terminal-scroll div {
    text-align: left;
    color: #fff;
}

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

[data-theme="dark"] .terminal-cursor {
    background-color: #fff;
}

[data-theme="light"] .terminal-cursor {
    background-color: #ffffff;
}

#neon-cuboctahedron {
    width: 120px;
    height: 120px;
    position: relative;
    z-index: 9999;
    opacity: 0;
    transform: scale(0.5);
    transition: opacity 333ms ease-in-out, transform 333ms ease-in-out;
}

#neon-cuboctahedron.initialized {
    opacity: 1;
    transform: scale(1);
}

.spin-electron-initialized {
    animation: fadeIn 333ms ease-in-out forwards;
}

@keyframes fadeIn {
    from { 
        opacity: 0;
        transform: scale(0.5);
    }
    to { 
        opacity: 1;
        transform: scale(1);
    }
}

.splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--dark-bg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: transform 0.666s ease, opacity 0.666s ease, visibility 0.666s ease;
    font-family: 'Ubuntu Mono';
    opacity: 1;
    visibility: visible;
}

.splash-screen.fade-out {
    opacity: 0;
    visibility: hidden;
}

.story-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: transparent;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: transform 0.666s ease, opacity 0.666s ease, visibility 0.666s ease;
}

.story-modal-backdrop.active {
    opacity: 1;
    visibility: visible;
    background-color: transparent;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.story-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    width: 800px;
    height: 800px;
    background-color: transparent;
    border: 1px solid #666;
    border-radius: 30px;
    padding: 30px;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: transform 0.666s ease, opacity 0.666s ease, visibility 0.666s ease;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.story-modal.active {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.story-modal-header {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 20px;
    margin-bottom: 0;
    flex-shrink: 0;
    background: transparent;
    z-index: 2;
    padding-bottom: 0;
}

.story-modal-header h2 {
    font-size: 34px;
    font-weight: 500;
    color: #ffffff;
    margin: 0;
    line-height: 1.2;
    display: flex;
    flex-direction: column;
    text-align: right;
    z-index: 2;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
}

.story-content {
    color: #666;
    text-align: right;
    font-size: 24px;
    line-height: 1.2;
    position: relative;
    z-index: 2;
    padding-bottom: 25px;
    padding-top: -20px;
    overflow-y: auto;
    flex-grow: 1;
    margin-right: -20px;
    padding-right: 20px;
    mask-image: linear-gradient(to bottom, 
        transparent 0%,
        black 10%,
        black 90%,
        transparent 100%
    );
    -webkit-mask-image: linear-gradient(to bottom, 
        transparent 0%,
        black 10%,
        black 90%,
        transparent 100%
    );
}

.story-content::-webkit-scrollbar {
    width: 8px;
}

.story-content::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
}

.story-content::-webkit-scrollbar-thumb {
    background: rgba(102, 102, 102, 0.5);
    border-radius: 4px;
}

.story-content::-webkit-scrollbar-thumb:hover {
    background: rgba(102, 102, 102, 0.7);
}

.story-content {
    scrollbar-width: thin;
    scrollbar-color: rgba(102, 102, 102, 0.5) rgba(0, 0, 0, 0.1);
}

.story-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
    z-index: 3;
}

.story-modal-close:hover {
    transform: scale(1.1);
}

.story-modal-close:active {
    transform: scale(0.9);
}

.story-header {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 30px;
    margin-bottom: 30px;
    flex-shrink: 0;
}

#story-cuboctahedron {
    width: 216px;
    height: 216px;
    position: relative;
    z-index: 2;
    cursor: pointer;
}

.story-content h2 {
    font-size: 30px;
    font-weight: 500;
    color: #ffffff;
    margin: 0 0 0px 0;
    line-height: 1.2;
    display: flex;
    flex-direction: column;
    text-align: right;
    z-index: 2;
}

.story-content p {
    margin-top: 25px;
    color: #666;
    text-align: right;
    position: relative;
    z-index: 2;
}

.story-content h3 {
    margin-top: 25px;
    font-size: 24px;
    color: #666;
    text-align: right;
    position: relative;
    z-index: 2;
}

.story-content h2p {
    font-size: 24px;
    color: #ffffff;
    text-align: right;
    position: relative;
    z-index: 2;
    margin-top: 5px;
}

[data-theme="light"] .story-content p,
[data-theme="light"] .story-content h2p {
    color: #ffffff;
}

body.story-modal-open {
    position: fixed !important;
    width: 100% !important;
    overflow: hidden !important;
    left: 0 !important;
    right: 0 !important;
    top: 0 !important;
    bottom: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    height: 100vh !important;
}

body.story-modal-open::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    z-index: -1;
}

body.story-modal-open .container:not(.story-modal):not(.story-modal-backdrop),
body.story-modal-open header,
body.story-modal-open footer {
    pointer-events: none;
}

body.story-modal-open .story-modal,
body.story-modal-open .story-modal-backdrop {
    opacity: 1;
    pointer-events: auto;
}

html.story-modal-open,
body.story-modal-open {
    overflow: hidden !important;
    height: 100% !important;
    position: relative !important;
}

.story-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    width: 800px;
    height: 800px;
    background-color: transparent;
    border: 1px solid #666;
    border-radius: 30px;
    padding: 30px;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: transform 0.666s ease, opacity 0.666s ease, visibility 0.666s ease;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.story-modal.active {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.story-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.55);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: transform 0.666s ease, opacity 0.666s ease, visibility 0.666s ease;
}

.story-modal-backdrop.active {
    opacity: 1;
    visibility: visible;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: transparent;
    padding: 20px 0;
    transition: all 0.3s ease;
}

header .container {
    position: relative;
    z-index: 1;
    padding: 20px;
    background: rgba(0, 0, 0, 0);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 0 0 30px 30px;
}

/* Убираем все тени и градиенты с хедера */
[data-theme="light"] header,
[data-theme="dark"] header {
    background: transparent;
    border: none;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

header .container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 200%;
    background: linear-gradient(to bottom,
        rgba(0, 0, 0, 0.95) 0%,
        rgba(0, 0, 0, 0.9) 20%,
        rgba(0, 0, 0, 0.8) 40%,
        rgba(0, 0, 0, 0.6) 60%,
        rgba(0, 0, 0, 0.4) 80%,
        rgba(0, 0, 0, 0.2) 90%,
        rgba(0, 0, 0, 0) 100%
    );
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 0 0 30px 30px;
    z-index: -1;
}

/* Стили для темной темы */
[data-theme="dark"] header .container::after {
    background: linear-gradient(to bottom,
        rgba(16, 24, 26, 0.95) 0%,
        rgba(16, 24, 26, 0.9) 20%,
        rgba(16, 24, 26, 0.8) 40%,
        rgba(16, 24, 26, 0.6) 60%,
        rgba(16, 24, 26, 0.4) 80%,
        rgba(16, 24, 26, 0.2) 90%,
        rgba(16, 24, 26, 0) 100%
    );
}

/* Имя и должность в модалке story всегда белые */
.story-content h3,
.story-content h2p {
    color: #fff !important;
}