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

body {
    font-family: Arial, sans-serif;
    background: url('musicbox.jpg') center/cover no-repeat fixed;
    min-height: 100vh;
    color: white;
    overflow-x: hidden;
    overflow-y: auto;
    position: relative;
    display: flex;
    flex-direction: column;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    z-index: 0;
}

body.scrollable {
    height: auto;
    min-height: 100vh;
    overflow: auto;
}

.text-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 30px;
    line-height: 1.6;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.text-content h2 {
    color: #4a90e2;
    margin: 30px 0 15px 0;
    font-size: 1.5rem;
}

.text-content p {
    margin-bottom: 15px;
    text-align: justify;
}

.text-content ul {
    margin: 10px 0 15px 20px;
}

.text-content li {
    margin-bottom: 8px;
}

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    padding: 15px 0;
    z-index: 1001;
    text-align: center;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    z-index: 1002;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: white;
    margin: 3px 0;
    transition: 0.3s;
    border-radius: 2px;
}

.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    justify-content: center;
}

.nav-menu li {
    margin: 0;
}

.navbar a {
    color: white;
    text-decoration: none;
    margin: 0 20px;
    padding: 10px 15px;
    border-radius: 5px;
    transition: background 0.3s;
}

.navbar a:hover {
    background: rgba(255, 255, 255, 0.1);
}

.main-content {
    margin-top: 70px;
    min-height: calc(100vh - 70px);
    display: flex;
    flex-direction: column;
    padding: 0 20px;
    position: relative;
    z-index: 1;
    flex: 1;
}

.main-content h1 {
    font-size: 4rem;
    font-weight: bold;
    margin: 20px 0;
    text-align: center;
}

.phrase-container {
    max-width: 900px;
    width: 100%;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

#animated-phrase {
    font-size: 2.7rem;
    line-height: 1.6;
    color: white;
    text-align: center;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.8), 0 0 40px rgba(255, 255, 255, 0.6);
    background: rgba(0, 0, 0, 0.4);
    padding: 30px;
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.buttons-container {
    display: flex;
    flex-direction: row;
    gap: 2rem;
    justify-content: center;
    align-items: center;
    margin-bottom: 30px;
    width: 100%;
}

.bot-button {
    background: #1877f2;
    color: white;
    border: none;
    padding: 20px 40px;
    font-size: 1.8rem;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.3s;
    width: 75vw;
    max-width: 600px;
    min-width: 300px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

.bot-button:hover {
    background: #166fe5;
}

.page {
    display: none;
}

.page.active {
    display: block;
}

#home {
    background: url('musicbox.jpg') center/cover no-repeat fixed;
}

#terms, #privacy, #portfolio, #pricing, #contacts {
    background: linear-gradient(135deg, #0f0f23, #1a1a3e, #0d1b2a);
    min-height: 100vh;
    overflow-y: auto;
}

/* Загальні стилі для всіх сторінок - забезпечуємо прокрутку */
body {
    overflow-y: auto !important;
    height: auto !important;
    min-height: 100vh;
}

/* Додаткові стилі для сторінок з контентом */
.terms-container, .privacy-container, .portfolio-container, .pricing-container, .contacts-container {
    overflow-y: visible !important;
    height: auto !important;
    min-height: 100vh;
}

/* Додаткові стилі для мобільних пристроїв */
@media (max-width: 768px) {
    body {
        overflow-y: auto !important;
        height: auto !important;
    }
    
    .main-content {
        overflow-y: visible !important;
        height: auto !important;
        min-height: calc(100vh - 60px);
    }
}

@media (max-width: 480px) {
    .main-content {
        overflow-y: visible !important;
        height: auto !important;
        min-height: calc(100vh - 50px);
    }
}

#terms .main-content, #privacy .main-content, #portfolio .main-content, #pricing .main-content, #contacts .main-content {
    margin-top: 70px;
    padding: 20px;
}

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

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

@media (max-width: 1200px) {
    .navbar {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 15px 20px;
    }

    .hamburger {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: rgba(0, 0, 0, 0.95);
        backdrop-filter: blur(20px);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 2rem 0;
        z-index: 1000;
        justify-content: flex-start;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-menu li {
        margin: 1rem 0;
    }

    .nav-menu a {
        font-size: 22px;
        padding: 20px 25px;
        display: block;
        color: white;
        text-decoration: none;
        transition: all 0.3s ease;
        font-weight: 500;
    }

    .nav-menu a:hover {
        background: rgba(78, 205, 196, 0.2);
        color: #4ecdc4;
    }

    .hamburger.active span:nth-child(1) {
        transform: rotate(-45deg) translate(-5px, 6px);
    }

    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active span:nth-child(3) {
        transform: rotate(45deg) translate(-5px, -6px);
    }
}

/* Горизонтальна орієнтація (лежачий екран) - кнопки поруч */
@media (orientation: landscape) {
    .buttons-container {
        flex-direction: row !important;
        gap: 2rem !important;
    }
}

/* Вертикальна орієнтація (стоячий екран) - кнопки одна над одною */
@media (orientation: portrait) {
    .buttons-container {
        flex-direction: column !important;
        gap: 20px !important;
        margin-bottom: 100px !important;
        padding-bottom: 80px !important;
    }
    
    .main-content {
        padding-bottom: 120px !important;
        margin-bottom: 60px !important;
    }
    
    /* Безпечна зона для пристроїв з вирізом */
    body {
        padding-bottom: env(safe-area-inset-bottom, 80px) !important;
    }
    
    /* Додаткові стилі для мобільних пристроїв з вирізами */
    @supports (padding: max(0px)) {
        .buttons-container {
            padding-bottom: max(20px, env(safe-area-inset-bottom));
        }
    }
}@media (max-width: 768px) {
    .navbar {
        padding: 10px 15px;
    }
    
    .main-content {
        margin-top: 60px;
        padding: 20px 15px;
        min-height: calc(100vh - 60px);
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }
    
    .main-content h1 {
        font-size: 1.8rem;
        margin-bottom: 20px;
        text-align: center;
    }
    
    .phrase-container {
        flex: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        margin: 20px 0;
    }
    
    #animated-phrase {
        font-size: 1.4rem;
        line-height: 1.6;
        padding: 20px;
        margin: 0;
        text-align: center;
        width: 100%;
        max-width: 90%;
    }
    
    .buttons-container {
        flex-direction: column;
        gap: 15px;
        margin-top: auto;
        margin-bottom: 20px;
        width: 100%;
        padding-bottom: env(safe-area-inset-bottom, 20px);
    }
    
    .bot-button {
        width: 100%;
        padding: 15px 20px;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .navbar {
        padding: 8px 10px;
    }
    
    .main-content {
        margin-top: 50px;
        padding: 15px 10px;
        min-height: calc(100vh - 50px);
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }
    
    .main-content h1 {
        font-size: 1.5rem;
        margin-bottom: 15px;
        text-align: center;
    }
    
    .phrase-container {
        flex: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        margin: 15px 0;
    }
    
    #animated-phrase {
        font-size: 1.2rem;
        line-height: 1.5;
        padding: 15px;
        margin: 0;
        text-align: center;
        width: 100%;
        max-width: 95%;
    }
    
    .buttons-container {
        flex-direction: column;
        gap: 12px;
        margin-top: auto;
        margin-bottom: 15px;
        width: 100%;
        padding-bottom: env(safe-area-inset-bottom, 15px);
    }
    
    .bot-button {
        padding: 12px 15px;
        font-size: 14px;
    }
    
    .text-content {
        padding: 20px 15px;
        margin: 10px;
    }
    
    .text-content h2 {
        font-size: 1.2rem;
        margin: 20px 0 10px 0;
    }
    
    .text-content p {
        font-size: 14px;
        line-height: 1.5;
    }
}

/* Футер з посиланнями */
.footer-links {
    position: relative;
    z-index: 10;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    margin-top: auto;
    width: 100%;
    flex-shrink: 0;
}

.footer-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px 30px;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-container a {
    color: #4ecdc4;
    text-decoration: none;
    font-size: 14px;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.3s ease;
    background: rgba(78, 205, 196, 0.1);
    border: 1px solid rgba(78, 205, 196, 0.3);
}

.footer-container a:hover {
    background: rgba(78, 205, 196, 0.2);
    border-color: rgba(78, 205, 196, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(78, 205, 196, 0.3);
}

@media (max-width: 768px) {
    .footer-container {
        padding: 15px 20px;
        gap: 15px;
    }
    
    .footer-container a {
        font-size: 13px;
        padding: 6px 10px;
    }
}