:root {
    --bg-color: #0b0b0e;
    --text-color: #f5f5f5;
    --accent-color: #e50914; 
    --card-bg: #16161a;
}

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

body {
    font-family: 'Montserrat', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Pagrindinis puslapis */
#main-view {
    transition: opacity 0.3s ease;
}

#main-view.hidden {
    display: none;
}

.hero {
    position: relative;
    height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: url('https://images.unsplash.com/photo-1476514525535-07fb3b4ae5f1?ixlib=rb-4.0.3&auto=format&fit=crop&w=1920&q=80') center/cover no-repeat;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(to bottom, rgba(11,11,14,0.3) 0%, rgba(11,11,14,1) 100%);
}

/* Viršutiniai mygtukai dešiniajame kampe */
.hero-top-actions {
    position: absolute;
    top: 20px;
    right: 30px;
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 100;
}

.global-map-btn {
    background: rgba(22, 22, 26, 0.85);
    color: var(--text-color);
    padding: 10px 20px;
    font-size: 0.95rem;
    text-decoration: none;
    font-weight: 700;
    border-radius: 30px;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.global-map-btn svg {
    color: var(--accent-color);
    flex-shrink: 0;
    transition: transform 0.3s ease, color 0.3s ease;
}

.global-map-btn:hover {
    transform: scale(1.05);
    background: rgba(34, 34, 42, 0.95);
    border-color: var(--accent-color);
    box-shadow: 0 4px 20px rgba(229, 9, 20, 0.35);
    color: #fff;
}

.global-map-btn:hover svg {
    transform: rotate(15deg);
}

.global-install-btn {
    background: rgba(22, 22, 26, 0.85);
    color: var(--text-color);
    padding: 10px 20px;
    font-size: 0.95rem;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    border-radius: 30px;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    cursor: pointer;
    outline: none;
}

.global-install-btn:hover {
    transform: scale(1.05);
    background: rgba(34, 34, 42, 0.95);
    border-color: var(--accent-color);
    box-shadow: 0 4px 20px rgba(229, 9, 20, 0.35);
    color: #fff;
}

.hidden-install {
    display: none !important;
}

.global-subscribe-btn {
    background-color: var(--accent-color);
    color: white;
    padding: 10px 20px;
    font-size: 0.95rem;
    text-decoration: none;
    font-weight: 700;
    border-radius: 30px;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(229, 9, 20, 0.4);
}

.global-subscribe-btn:hover {
    transform: scale(1.05);
    background-color: #ff0f1a;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    padding: 0 20px;
    animation: fadeIn 1.5s ease-out;
}

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.hero-content p {
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem;
    color: #d1d1d1;
    margin-bottom: 20px;
    font-style: italic;
}

.tabs-container {
    max-width: 1200px;
    margin: -30px auto 30px auto;
    position: relative;
    z-index: 10;
    padding: 0 20px;
}

/* Paieškos laukelis */
.search-wrapper {
    max-width: 480px;
    margin: 0 auto 20px auto;
    position: relative;
    display: flex;
    align-items: center;
    background: rgba(22, 22, 26, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50px;
    padding: 10px 20px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.search-wrapper:focus-within {
    border-color: var(--accent-color);
    box-shadow: 0 4px 20px rgba(229, 9, 20, 0.35);
    background: rgba(28, 28, 34, 0.95);
}

.search-icon {
    color: #888;
    margin-right: 12px;
    flex-shrink: 0;
    transition: color 0.3s ease;
}

.search-wrapper:focus-within .search-icon {
    color: var(--accent-color);
}

#searchInput {
    width: 100%;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-color);
    font-family: 'Montserrat', sans-serif;
    font-size: 0.95rem;
}

#searchInput::placeholder {
    color: #888;
    transition: color 0.3s ease;
}

#searchInput:focus::placeholder {
    color: #aaa;
}

.tabs {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    background: rgba(22, 22, 26, 0.9);
    padding: 15px;
    border-radius: 50px;
    backdrop-filter: blur(10px);
    border: 1px solid #333;
}

.tab-btn {
    background-color: transparent;
    color: var(--text-color);
    border: 2px solid transparent;
    padding: 10px 20px;
    font-size: 0.95rem;
    cursor: pointer;
    border-radius: 30px;
    transition: all 0.3s;
    font-weight: 600;
    text-transform: uppercase;
}

.tab-btn:hover { background-color: rgba(255, 255, 255, 0.05); }
.tab-btn.active {
    background-color: var(--accent-color);
    color: white;
    box-shadow: 0 4px 15px rgba(229, 9, 20, 0.4);
}

.tab-content { display: none; animation: fadeIn 0.5s ease-out; }
.tab-content.active { display: block; }

.section {
    padding: 2rem 20px 5rem 20px;
    max-width: 1400px;
    margin: 0 auto;
}

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

.card {
    background-color: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #222;
    cursor: pointer;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.card.hidden-search {
    display: none !important;
}

.card:hover {
    transform: translateY(-8px);
    border-color: var(--accent-color);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.video-thumbnail {
    position: relative;
    padding-bottom: 56.25%;
    background-color: #111;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.video-thumbnail img {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    object-fit: cover;
}

.play-icon {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 50px; height: 50px;
    background: rgba(229, 9, 20, 0.8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.8;
    transition: all 0.3s;
}

.card:hover .play-icon {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.1);
}

.play-icon::after {
    content: '';
    border-style: solid;
    border-width: 10px 0 10px 16px;
    border-color: transparent transparent transparent white;
    margin-left: 4px;
}

.card-body { padding: 1.5rem; }
.card-body h3 {
    font-size: 1.1rem;
    margin-bottom: 10px;
    line-height: 1.4;
}
.badge {
    display: inline-block;
    background-color: #333;
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 20px;
    margin-bottom: 10px;
    text-transform: uppercase;
}

/* Detalusis video puslapis (Overlay) */
#video-view {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background-color: var(--bg-color);
    z-index: 1000;
    overflow-y: auto;
    animation: slideUp 0.4s ease-out forwards;
}

#video-view.active {
    display: block;
}

.video-header {
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.btn-back {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Montserrat', sans-serif;
    text-transform: uppercase;
}

.btn-back:hover { color: var(--accent-color); }

.video-subscribe-link {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: bold;
}

.video-player-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

.video-iframe-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    box-shadow: 0 20px 50px rgba(0,0,0,0.8);
    border-radius: 12px;
    overflow: hidden;
    background: #000;
}

.video-iframe-wrapper iframe {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    border: none;
}

.video-details {
    max-width: 1000px;
    margin: 30px auto;
    padding: 0 20px;
    padding-bottom: 50px;
}

.video-details h1 {
    font-size: 2rem;
    margin-bottom: 15px;
}

.video-meta {
    display: flex;
    gap: 15px;
    color: #aaa;
    font-size: 0.9rem;
    margin-bottom: 25px;
    border-bottom: 1px solid #333;
    padding-bottom: 15px;
}

.video-description {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #ddd;
    white-space: pre-line;
}

.timestamp-link {
    color: var(--accent-color);
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: text-decoration 0.2s ease;
}

.timestamp-link:hover {
    text-decoration: underline;
}

.share-buttons {
    margin-top: 30px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.share-btn {
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    color: white;
    font-weight: bold;
    font-size: 0.9rem;
    display: inline-block;
    transition: opacity 0.3s;
}

.share-btn:hover { opacity: 0.8; }

.share-fb { background-color: #1877F2; }
.share-wa { background-color: #25D366; }

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

/* Footer ir PWA įdiegimo mygtukas */
footer {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px 20px 60px 20px;
}

#installBtn {
    background-color: var(--accent-color);
    color: #ffffff;
    border: none;
    padding: 14px 28px;
    font-size: 1rem;
    font-weight: 700;
    font-family: 'Montserrat', sans-serif;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(229, 9, 20, 0.4);
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    outline: none;
}

#installBtn:hover {
    background-color: #ff0f1a;
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 6px 20px rgba(229, 9, 20, 0.6);
}

#installBtn:active {
    transform: translateY(0) scale(0.98);
}

@media (max-width: 768px) {
    .search-wrapper {
        max-width: 100%;
        margin: 0 auto 15px auto;
        padding: 8px 16px;
    }
    .hero {
        flex-direction: column;
        padding: 20px 15px 40px 15px;
    }
    .hero-content {
        order: 1;
    }
    .hero-content h1 {
        font-size: 2rem;
    }
    .hero-top-actions {
        position: relative;
        top: auto;
        right: auto;
        left: auto;
        order: 2;
        justify-content: center;
        flex-wrap: wrap;
        gap: 10px;
        margin-top: 5px;
    }
    .global-map-btn,
    .global-install-btn,
    .global-subscribe-btn {
        padding: 8px 14px;
        font-size: 0.78rem;
        gap: 6px;
    }
    .global-map-btn svg,
    .global-subscribe-btn svg {
        width: 16px;
        height: 16px;
    }
    .tabs {
        flex-direction: row;
        flex-wrap: nowrap;
        justify-content: flex-start;
        overflow-x: auto;
        white-space: nowrap;
        border-radius: 30px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    .tabs::-webkit-scrollbar {
        display: none;
    }
    .tab-btn {
        width: auto;
        flex: 0 0 auto;
        white-space: nowrap;
    }
    .video-details h1 {
        font-size: 1.5rem;
    }
    footer {
        padding: 10px 15px 50px 15px;
    }
    #installBtn {
        width: 100%;
        max-width: 320px;
        padding: 14px 20px;
        font-size: 0.95rem;
    }
}
