/* Основна цветна палитра, вдъхновена от музика */
:root {
    --primary-dark-blue: #192841;     /* Тъмносиньо - основен цвят за тъмен режим */
    --primary-royal-blue: #274690;    /* Кралско синьо за акценти */
    --accent-purple: #7B68EE;         /* Пурпурен акцент */
    --accent-gold: #D4AF37;           /* Златен акцент за специални елементи */
    --text-dark: #333340;             /* Тъмен текст с лек син оттенък */
    --text-light: #F0F0F8;            /* Светъл текст с лек лавандулов оттенък */
    --bright-yellow: #FFC107;         /* Алтернативен ярко жълт цвят (по избор) */
}

/* Стилове за светъл режим */
body {
    font-family: 'Open Sans', sans-serif;
    margin: 0;
    padding: 20px;
    background-color: white;
    color: var(--text-dark);
    text-align: center;
    transition: background 0.3s, color 0.3s;
}

.dark-mode {
    background-color: #020814;
    color: #e0e0e0;
}

.header {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

h2 {
    font-size: 2.5em;
    margin: 20px 0;
    color: var(--primary-royal-blue); /* Променено на син цвят за заглавия */
    font-weight: 600;
}

.tooltip {
    position: relative;
    display: inline-block;
    cursor: pointer;
}

.tooltip::after {
    content: "Кой е?";
    position: absolute;
    bottom: -25px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary-royal-blue);
    color: white;
    padding: 5px;
    border-radius: 5px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s;
}

.tooltip:hover::after {
    opacity: 1;
}

.info-box {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 20px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    width: 80%;
    max-width: 300px;
    z-index: 10;
    transition: opacity 0.3s ease-in-out;
    opacity: 0;
}

.info-box.visible {
    opacity: 1;
}

.info-box.dark-mode {
    background: #333;
    color: #e0e0e0;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
}

.close-btn {
    background-color: #1877f2;
    color: white;
    border: none;
    border-radius: 5px;
    padding: 4px 10px;
    font-size: 1em;
    cursor: pointer;
    transition: transform 0.2s, background-color 0.3s;
}

.theme-toggle {
    background-color: #1877f2;
    color: white;
    border: none;
    border-radius: 5px;
    padding: 0px 10px;
    font-size: 0.9em;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: relative;
    overflow: hidden;
}

.close-btn:hover, .theme-toggle:hover {
    background-color: var(--primary-royal-blue);
    transform: scale(1.05);
}

.video-container {
    max-width: 800px;
    margin: 10px auto;
    padding: 0 10px;
}

.video-container iframe {
    width: 100%;
    height: 450px;
    border: none;
    aspect-ratio: 16 / 9;
}

.video-thumbnails {
    max-width: 800px;
    margin: 10px auto;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    padding: 0 10px;
}

.video-item {
    width: 32%;
    text-align: center;
    margin-bottom: 5px;
    position: relative;
}

.video-item img {
    width: 100%;
    cursor: pointer;
    border-radius: 5px;
    transition: opacity 0.3s, filter 0.3s;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.video-item:hover img {
    opacity: 0.7;
    filter: brightness(0.9) sepia(0.2) hue-rotate(225deg);
}

.video-title {
    margin-top: 5px;
    font-size: 14px;
    color: #555;
}

/* Бутон за възпроизвеждане за миниатюрите */
.video-item .play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    background: rgba(212, 175, 55, 0.7); /* Златно-жълт цвят */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 2;
}

.video-item .play-button::after {
    content: '';
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 10px 0 10px 15px;
    border-color: transparent transparent transparent #fff;
    margin-left: 3px;
}

/* Бутон за възпроизвеждане за основното видео */
#main-video-wrapper {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%;
}

#main-video-wrapper .play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 70px;
    height: 70px;
    background: rgba(212, 175, 55, 0.7); /* Идентичен златно-жълт цвят като при миниатюрите */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 2;
    opacity: 1;
    transition: opacity 0.3s ease;
}

#main-video-wrapper .play-button::after {
    content: '';
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 12px 0 12px 18px;
    border-color: transparent transparent transparent #fff;
    margin-left: 4px;
}

#main-video-wrapper .play-button.hidden {
    opacity: 0;
}

/* Алтернативен по-ярък жълт цвят (ако желаете) */
.bright-play-button .play-button {
    background: rgba(255, 193, 7, 0.7); /* По-ярък жълт цвят */
}

/* Медийни заявки */
@media (max-width: 800px) {
    .video-container, .video-thumbnails {
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .video-item {
        width: 48%;
    }
    .video-container iframe {
        height: 300px;
    }
    .header {
        flex-direction: column;
        gap: 5px;
    }
    .tooltip::after {
        font-size: 10px;
    }
    h2 {
        font-size: 1.8em;
    }
}

@media (max-width: 480px) {
    .video-item {
        width: 100%;
    }
    .video-container iframe {
        height: 200px;
    }
    .info-box {
        width: 90%;
        padding: 15px;
    }
    .close-btn {
        width: auto;
        padding: 10px 20px;
    }
    .theme-toggle {
        padding: 3px 8px;
    }
    .video-title {
        font-size: 12px;
    }
    h2 {
        font-size: 1.5em;
    }
    .video-item .play-button {
        display: none;
    }
    #main-video-wrapper .play-button {
        width: 50px;
        height: 50px;
    }
    #main-video-wrapper .play-button::after {
        border-width: 10px 0 10px 15px;
        margin-left: 3px;
    }
}

.shorts-container {
    max-width: 800px;
    margin: 20px auto;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    padding: 0 10px;
}

.shorts-item {
    width: 256px;
    margin-bottom: 20px;
}

@media (max-width: 800px) {
    .shorts-item {
        width: 48%;
    }
}

@media (max-width: 480px) {
    .shorts-item {
        width: 100%;
    }
}

.video-item {
    position: relative;
    width: 32%;
    text-align: center;
    margin-bottom: 20px;
    overflow: hidden;
}

.video-item::before, 
.video-item::after {
    display: none !important;
}

.close-btn {
    display: block;
    margin: 10px auto;
}

.header-buttons {
    display: flex;
    gap: 10px;
}

body {
    background-color: white;
    background-attachment: fixed;
    background-position: center;
}

.dark-mode {
    background-color: #020814;
}

.dark-mode .page-container {
    background-color: var(--primary-dark-blue);
    color: var(--text-light);
    box-shadow: 0 0 20px rgba(123, 104, 238, 0.15);
}

.dark-mode h2 {
    color: var(--accent-gold);
}

.dark-mode .close-btn:hover, 
.dark-mode .theme-toggle:hover {
    background-color: #1877f2;
    color: var(--primary-dark-blue);
}

.dark-mode .video-title {
    color: #ccc;
}

.dark-mode .tooltip::after {
    background: var(--accent-gold);
    color: var(--primary-dark-blue);
}

.stars-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

.stars-background svg {
    position: absolute;
    width: 100%;
    height: 100%;
}

.stars-background use {
    animation: twinkle 3s infinite alternate ease-in-out;
}

@keyframes twinkle {
    0% { opacity: 0.3; filter: brightness(1); }
    50% { opacity: 1; filter: brightness(1.5); }
    100% { opacity: 0.3; filter: brightness(1); }
}

.dark-mode .stars-background use {
    fill: #D4AF37;
}

.page-container {
    max-width: 900px;
    margin: 20px auto;
    background-color: white;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    padding: 30px;
    transition: background-color 0.3s, color 0.3s, box-shadow 0.3s;
}

.iframe-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transition: opacity 0.3s ease;
    opacity: 1;
}

.iframe-placeholder.hidden {
    opacity: 0;
}

#main-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.main-menu {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1px 20px;
    background-color: white;
    color: var(--text-dark);
    border-bottom: 1px solid #eee;
}

.dark-mode .main-menu {
    background-color: var(--primary-dark-blue);
    color: white;
    border-bottom: 1px solid #333;
}

.menu-links {
    display: flex;
    gap: 15px;
}

.menu-links a {
    text-decoration: none;
    color: var(--primary-royal-blue);
    font-weight: 600;
    padding: 2px 10px;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.menu-links a:hover, .menu-links a.active {
    background-color: var(--primary-royal-blue);
    color: white;
}

.dark-mode .menu-links a {
    color: white;
}

.dark-mode .menu-links a:hover, 
.dark-mode .menu-links a.active {
    background-color: var(--accent-gold);
    color: var(--primary-dark-blue);
}

.hamburger-menu {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.hamburger-line {
    width: 25px;
    height: 3px;
    background-color: var(--primary-royal-blue);
    margin: 3px 0;
    transition: 0.4s;
}

.dark-mode .hamburger-line {
    background-color: white;
}

@media (max-width: 768px) {
    .menu-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 60px;
        left: 0;
        width: 100%;
        background-color: white;
        padding: 10px 0;
        z-index: 10;
        box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    }

    .dark-mode .menu-links {
        background-color: var(--primary-dark-blue);
    }

    .menu-links.active {
        display: flex;
    }

    .menu-links a {
        padding: 10px;
        text-align: center;
        border-bottom: 1px solid rgba(0,0,0,0.1);
    }

    .dark-mode .menu-links a {
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }

    .hamburger-menu {
        display: flex;
    }

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

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

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

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin: 20px auto;
    padding: 0 10px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 5px;
    cursor: pointer;
    transition: transform 0.3s;
    aspect-ratio: 1 / 1;
}

.gallery-item:hover {
    transform: scale(1.03);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.9);
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.show {
    display: flex;
    opacity: 1;
    align-items: center;
    justify-content: center;
}

.modal-content {
    max-width: 90%;
    max-height: 90vh;
    position: relative;
}

.modal-content img {
    max-width: 100%;
    max-height: 80vh;
    display: block;
    margin: 0 auto;
}

.close-modal {
    position: absolute;
    top: -40px;
    right: 0;
    color: white;
    font-size: 35px;
    cursor: pointer;
}

.modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-size: 30px;
    cursor: pointer;
    padding: 20px;
    background: rgba(0,0,0,0.5);
    border-radius: 50%;
}

.modal-prev { left: 20px; }
.modal-next { right: 20px; }

/* Правила за текст на условията (consent banner) */
.consent-text span {
    font-size: 16px; /* 16px - Основен размер за PC/лаптопи */
}

@media (max-width: 1024px) {
    .consent-text span {
        font-size: 15px; /* 15px - Леко намален размер за таблети */
    }
}

@media (max-width: 768px) {
    .consent-text span {
        font-size: 14px; /* 14px - Размер за по-малки таблети и големи телефони */
    }
}

@media (max-width: 480px) {
    .consent-text span {
        font-size: 12px; /* 12px - Минимален размер за малки телефони */
    }
}

h2 {
    font-size: 2.5em; /* Основен размер за десктоп */
}

@media (max-width: 768px) {
    h2 {
        font-size: 1.6em; /* Намален размер за таблети */
    }
}

@media (max-width: 480px) {
    h2 {
        font-size: 1.3em; /* Още по-малък размер за телефони */
    }
}

/* Настолни компютри */
@media (min-width: 1024px) {
    h2 {
        margin-top: -15px;
    }
}

/* Мобилни устройства (по избор) */
@media (max-width: 768px) {
    h2 {
        margin-top: -15px; /* Различно отместване за мобилни */
    }
}

/* Стилове за галерията с алт текстове */
.gallery-item {
    position: relative;
    margin-bottom: 25px; /* Добавете място за текста */
}

.gallery-img-container {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    border-radius: 5px;
}

.gallery-img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.gallery-alt-text {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 10px;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    font-size: 14px;
    text-align: center;
    transition: all 0.3s ease;
    transform: translateY(100%);
    opacity: 0;
}

.gallery-item:hover .gallery-alt-text {
    transform: translateY(0);
    opacity: 1;
}

/* За мобилни устройства - винаги показвай текста */
@media (max-width: 768px) {
    .gallery-alt-text {
        position: relative;
        transform: none;
        opacity: 1;
        background-color: transparent;
        color: #333;
        padding: 8px 0;
        font-size: 13px;
    }
    
    .dark-mode .gallery-alt-text {
        color: #e0e0e0;
    }
}

/* Стилове за тъмен режим */
.dark-mode .gallery-alt-text {
    color: white;
    background-color: rgba(0, 0, 0, 0.7);
}

.modal-alt-text {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 15px;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    text-align: center;
    font-size: 16px;
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
    z-index: 1001;
}

.close-modal:hover {
    color: #bbb;
    text-decoration: none;
}

.info-section {
    max-width: 840px;
    margin: 0 auto;
    padding: 20px;
}

.info-content {
    text-align: left;
}

.info-content h3 {
    text-align: center;
    margin: 30px 0 15px 0;
    color: #D4AF37; /* Златист цвят за заглавията */
}

.info-content p {
    margin-bottom: 15px;
    line-height: 1.6;
}

.dark-mode .info-content h3 {
    color: #D4AF37; /* Златист цвят и в тъмния режим */
}

.dark-mode .info-content p {
    color: #e0e0e0; /* Светъл текст в тъмния режим */
}

.info-section {
    border-top: 1px solid #e0e0e0;
    border-bottom: 1px solid #e0e0e0;
    margin: 30px auto;
}

.dark-mode .info-section {
    border-color: #333;
}

.video-overlay-link {
    position: absolute;
    bottom: 10px;
    left: 0;
    width: 100%;
    text-align: center;
    pointer-events: none;
}

.video-overlay-link a {
    color: white;
    text-shadow: 1px 1px 4px black;
    font-size: 1em;
    font-weight: bold;
    pointer-events: auto;
    text-decoration: none;
    background-color: rgba(0, 0, 0, 0.4);
    padding: 5px 10px;
    border-radius: 6px;
    display: inline-block;
    max-width: 90%;
}

/* Малки екрани – телефони */
@media (max-width: 600px) {
    .video-overlay-link a {
        font-size: 0.85em;
        padding: 4px 8px;
        max-width: 95%;
        line-height: 1.4;
    }
}

/* Много малки екрани */
@media (max-width: 400px) {
    .video-overlay-link a {
        font-size: 0.78em;
        padding: 3px 6px;
    }
}