/* Base styles */
body {
    background-color: #121212;
    color: #e0e0e0;
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

/* Top social bar */
.social-bar {
    background-color: #121212;
    border-bottom: 1px solid #333;
    padding: 8px 0;
    display: flex;
    justify-content: center;
    position: sticky;
    top: 0;
    z-index: 101;
}

.social-buttons {
    display: flex;
    gap: 15px;
    align-items: center;
}

.social-button {
    background: #333;
    color: #e0e0e0;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: background-color 0.3s;
    font-size: 0.9rem;
}

.social-button:hover {
    background-color: #8B4513;
}

/* Main Header Container */
.main-header {
    background-color: #1e1e1e;
    border-bottom: 1px solid #333;
    position: sticky;
    top: 40px;
    z-index: 100;
}

/* Top Row - Logo, Search, Button */
.header-top-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
    height: 70px;
}

.logo h1 {
    font-size: 2rem;
    margin: 0;
    color: #D2B48C;
    white-space: nowrap;
}

.logo h1 span {
    color: #8B4513;
}

/* Search bar styles */
.search-bar {
    display: flex;
    align-items: center;
    flex-grow: 1;
    max-width: 600px;
    margin: 0 30px;
}

.search-bar input {
    padding: 10px 20px;
    border-radius: 20px;
    border: none;
    background-color: #333;
    color: white;
    width: 100%;
    outline: none;
    font-size: 1rem;
}

.search-bar input::placeholder {
    color: #aaa;
}

#termite-mode {
    background: #8B4513;
    color: white;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    font-weight: bold;
    border-radius: 4px;
    transition: background-color 0.3s;
    white-space: nowrap;
    font-size: 1rem;
}

#termite-mode:hover {
    background-color: #654321;
}

/* Navigation Bar */
.nav-bar {
    display: flex;
    justify-content: center;
    padding: 15px 0;
    border-top: 1px solid #333;
    background-color: #1a1a1a;
}

.nav-container {
    display: flex;
    width: 100%;
    max-width: 1200px;
    justify-content: center;
    padding: 0 30px;
    gap: 20px;
}

.nav-item {
    position: relative;
    text-align: center;
}

.nav-item > a {
    color: #e0e0e0;
    text-decoration: none;
    font-weight: bold;
    font-size: 1rem;
    white-space: nowrap;
    transition: color 0.3s;
    padding: 5px 10px;
    display: block;
}

.nav-item > a:hover {
    color: #D2B48C;
}

/* Dropdown styles */
.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #1e1e1e;
    min-width: 200px;
    border: 1px solid #333;
    border-top: none;
    border-radius: 0 0 8px 8px;
    z-index: 1;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

.dropdown-content a {
    color: #e0e0e0;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    text-align: left;
    transition: background-color 0.3s;
}

.dropdown-content a:hover {
    background-color: #333;
    color: #D2B48C;
}

.nav-item:hover .dropdown-content {
    display: block;
}

/* Splash screen styles */
.splash-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    background-color: rgba(0,0,0,0.7);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
}

.splash-box {
    background-color: #1e1e1e;
    border: 1px solid #8B4513;
    border-radius: 10px;
    padding: 40px 50px;
    width: 500px;
    max-width: 85%;
    text-align: center;
    box-shadow: 0 0 25px rgba(139, 69, 19, 0.8);
}

.splash-title {
    font-size: 3rem;
    font-weight: bold;
    color: #D2B48C;
    margin-bottom: 30px;
    letter-spacing: 1px;
}

.splash-title span {
    color: #8B4513;
}

.splash-text {
    background-color: #333;
    color: #e0e0e0;
    padding: 20px;
    margin: 25px 0;
    border-radius: 8px;
    font-size: 1.2rem;
    line-height: 1.5;
}

.splash-small-text {
    background-color: #333;
    color: #aaa;
    padding: 15px;
    margin: 25px 0;
    border-radius: 8px;
    font-size: 1rem;
    line-height: 1.6;
}

.splash-buttons {
    display: flex;
    gap: 20px;
    margin-top: 30px;
}

.splash-button {
    flex: 1;
    padding: 15px;
    border: none;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 1.1rem;
}

.enter-button {
    background-color: #8B4513;
    color: white;
}

.enter-button:hover {
    background-color: #654321;
    transform: translateY(-2px);
}

.exit-button {
    background-color: #333;
    color: #e0e0e0;
    border: 1px solid #555;
}

.exit-button:hover {
    background-color: #444;
    transform: translateY(-2px);
}

/* Main content container */
.main-container {
    padding: 0 5%;
    max-width: 1800px;
    margin: 0 auto;
    overflow-y: auto;
}

/* Category tags */
.category-tags-container {
    display: flex;
    justify-content: center;
    width: 100%;
}

.category-tags {
    display: flex;
    gap: 10px;
    padding: 15px 0;
    overflow-x: auto;
    border-bottom: 1px solid #333;
    max-width: 1200px;
}

.category-tag {
    background: #333;
    color: #e0e0e0;
    padding: 8px 15px;
    border-radius: 20px;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.9rem;
}

.category-tag:hover, .category-tag.active {
    background: #8B4513;
    color: white;
}

/* Video grid styles */
.video-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
    padding: 20px 0;
}

.video-card {
    background: #1e1e1e;
    border: 1px solid #333;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
    width: 100%;
}

.video-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.video-card img {
    width: 100%;
    height: auto;
    display: block;
    aspect-ratio: 16/9;
    position: relative;
    z-index: 1;
}

.video-card.approved::after {
    content: "TERMITE APPROVED";
    position: absolute;
    top: 35px;
    right: -28px;
    width: 140px;
    background: #8B4513;
    color: white;
    padding: 3px 0;
    transform: rotate(45deg);
    font-size: 0.6rem;
    text-align: center;
    box-shadow: 0 0 5px rgba(0,0,0,0.3);
    z-index: 2;
}

.video-info {
    padding: 13px;
    background: #1e1e1e;
    position: relative;
    z-index: 1;
}

.video-title {
    font-weight: bold;
    margin: 6.5px 0;
    color: #e0e0e0;
    font-size: 1.17rem;
    line-height: 1.3;
}

.video-meta {
    display: flex;
    justify-content: space-between;
    color: #aaa;
    font-size: 1.04rem;
}

.duration {
    position: absolute;
    bottom: 90px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.8rem;
    z-index: 2;
}

/* Footer styles */
footer {
    background: #1e1e1e;
    color: #aaa;
    text-align: center;
    padding: 15px;
    margin-top: 30px;
    border-top: 1px solid #333;
}

/* Ad styles */
.ad {
    background: #333;
    padding: 15.6px;
    text-align: center;
    margin: 26px 0;
    border-radius: 10.4px;
    color: #e0e0e0;
    font-size: 1.3rem;
}

/* Responsive adjustments */
@media (max-width: 1400px) {
    .video-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 1100px) {
    .video-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    
    .nav-container {
        padding: 0 15px;
        gap: 10px;
    }
}

@media (max-width: 768px) {
    .header-top-row {
        flex-direction: column;
        height: auto;
        padding: 15px;
        gap: 15px;
    }
    
    .video-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    
    .search-bar {
        width: 100%;
        max-width: 100%;
        margin: 10px 0;
    }
    
    .nav-bar {
        overflow-x: auto;
        white-space: nowrap;
        justify-content: flex-start;
        padding: 10px 15px;
    }
    
    .nav-container {
        display: inline-flex;
        gap: 15px;
        padding: 0;
        justify-content: flex-start;
    }
    
    .dropdown-content {
        left: 0;
        transform: none;
    }
    
    .splash-box {
        padding: 30px;
        width: 90%;
    }
    
    .splash-title {
        font-size: 2.2rem;
        margin-bottom: 20px;
    }
    
    .splash-text {
        padding: 15px;
        font-size: 1.1rem;
    }
    
    .splash-buttons {
        flex-direction: column;
        gap: 15px;
    }
    
    .main-header {
        top: 80px;
    }
}

@media (max-width: 500px) {
    .video-grid {
        grid-template-columns: 1fr;
    }
    
    .video-meta {
        flex-direction: column;
        gap: 5px;
    }
    
    .video-meta span {
        width: 100%;
        text-align: left;
    }
    
    .social-buttons {
        gap: 8px;
    }
    
    .social-button {
        padding: 4px 8px;
        font-size: 0.8rem;
    }
    
    .logo h1 {
        font-size: 1.5rem;
    }
    
    #termite-mode {
        padding: 8px 12px;
        font-size: 0.9rem;
    }
}