:root {
    --primary-color: #ff0000;
    --secondary-color: #282828;
    --text-color: #f1f1f1;
    --text-secondary: #aaa;
    --background-color: #181818;
    --card-background: #212121;
    --sidebar-width: 240px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Roboto', Arial, sans-serif;
}

body {
    background-color: var(--background-color);
    color: var(--text-color);
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background-color: var(--secondary-color);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    height: 56px;
}

.logo-container {
    display: flex;
    align-items: center;
}

.menu-toggle {
    margin-right: 1rem;
    cursor: pointer;
    font-size: 1.2rem;
}

.logo {
    display: flex;
    align-items: center;
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary-color);
    cursor: pointer;
}

.logo i {
    margin-right: 0.5rem;
}

.search-container {
    display: flex;
    align-items: center;
    flex-grow: 1;
    max-width: 600px;
    margin: 0 1rem;
    position: relative;
}

.search-box {
    width: 100%;
    padding: 0.6rem 1rem;
    border: 1px solid #303030;
    background-color: #121212;
    color: var(--text-color);
    border-radius: 20px 0 0 20px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.search-box:focus {
    outline: none;
    border-color: var(--primary-color);
}

.search-button {
    padding: 0.6rem 1.2rem;
    background-color: #303030;
    border: 1px solid #303030;
    border-left: none;
    color: var(--text-color);
    border-radius: 0 20px 20px 0;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-button:hover {
    background-color: #404040;
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--secondary-color);
    border-radius: 0 0 8px 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    max-height: 300px;
    overflow-y: auto;
    display: none;
    z-index: 200;
}

.search-result-item {
    padding: 0.8rem 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #383838;
}

.search-result-item:hover {
    background-color: #383838;
}

.search-result-thumbnail {
    width: 60px;
    height: 45px;
    margin-right: 1rem;
    border-radius: 4px;
    overflow: hidden;
}

.search-result-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.search-result-title {
    font-size: 0.9rem;
    flex-grow: 1;
}

.user-actions {
    display: flex;
    align-items: center;
}

.share-button {
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1.8rem;
    cursor: pointer;
    margin-left: 1rem;
}

.share-button-video {
    padding: 0.6rem 1.2rem;
    background-color: var(--primary-color);
    border: none;
    border-radius: 20px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.share-button-video:hover {
    background-color: #dec106e8;
}

.sidebar {
    position: fixed;
    top: 56px;
    left: 0;
    bottom: 0;
    width: var(--sidebar-width);
    background-color: var(--secondary-color);
    padding: 1rem 0;
    overflow-y: auto;
    z-index: 90;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
}

.sidebar.active {
    transform: translateX(0);
}

.sidebar ul {
    list-style: none;
}

.sidebar li {
    padding: 0.8rem 1.5rem;
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 0.9rem;
}

.sidebar li i {
    margin-right: 1rem;
    font-size: 1.2rem;
}

.sidebar li.active {
    background-color: var(--primary-color);
    color: white;
}

.sidebar li.active i {
    color: white;
}

.sidebar li:hover {
    background-color: #383838;
}

.main-content {
    margin-top: 56px;
    margin-left: 0;
    padding: 1.5rem;
    transition: margin-left 0.3s ease;
}

.category-title {
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #383838;
}

.category-title h2 {
    font-size: 1.5rem;
    font-weight: 500;
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.video-card {
    cursor: pointer;
    transition: transform 0.2s ease;
}

.video-card:hover {
    transform: scale(1.03);
}

.video-thumbnail {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    background-color: #000;
    overflow: hidden;
    border-radius: 8px;
}

.video-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s ease;
}

.video-thumbnail:hover img {
    opacity: 0.8;
}

.video-thumbnail::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.video-thumbnail:hover::after {
    opacity: 1;
}

.video-play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 3rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.video-thumbnail:hover .video-play-icon {
    opacity: 0.8;
}

.video-info {
    margin-top: 0.5rem;
}

.video-title {
    font-size: 0.9rem;
    font-weight: 500;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    color: var(--text-secondary);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-left-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.video-main {
    margin-top: 56px;
    padding: 1.5rem;
}

.video-player-container {
    display: flex;
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.video-player {
    flex: 2;
}
.video-info-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
}

.video-player h1 {
    font-size: 1.5rem;
    font-weight: 500;
    margin: 0;
}

.share-button-video {
    padding: 0.6rem 1.2rem;
    background-color: var(--primary-color);
    border: none;
    border-radius: 20px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.share-button-video:hover {
    background-color: #11babae2;
}

.video-player video {
    width: 100%;
    aspect-ratio: 16/9;
    background-color: #000;
    border-radius: 8px;
}

.video-player h1 {
    margin-top: 1rem;
    font-size: 1.5rem;
    font-weight: 500;
}

.suggested-videos {
    flex: 1;
}

.suggested-videos h3 {
    margin-bottom: 1rem;
    font-size: 1.3rem;
    font-weight: 500;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #383838;
}

.suggested-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.suggested-list-item {
    display: flex;
    gap: 1rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: background-color 0.2s ease;
}

.suggested-list-item:hover {
    background-color: #282828;
}

.suggested-list-thumbnail {
    width: 180px;
    aspect-ratio: 16/9;
    border-radius: 4px;
    overflow: hidden;
    flex-shrink: 0;
}

.suggested-list-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.suggested-list-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.suggested-list-title {
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 0.3rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.suggested-list-category {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.more-suggestions {
    max-width: 1400px;
    margin: 2rem auto 0;
}

.more-suggestions h3 {
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
    font-weight: 500;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #383838;
}

.suggested-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.suggested-card {
    cursor: pointer;
    transition: transform 0.2s ease;
}

.suggested-card:hover {
    transform: scale(1.03);
}

.suggested-thumbnail {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    background-color: #000;
    overflow: hidden;
    border-radius: 8px;
}

.suggested-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.suggested-info {
    margin-top: 0.5rem;
}

.suggested-title {
    font-size: 0.9rem;
    font-weight: 500;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.suggested-category {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 0.2rem;
}

#suggestedLoading {
    margin-top: 2rem;
    display: none;
}

@media (min-width: 768px) {
    .main-content {
        margin-left: var(--sidebar-width);
    }
    
    .sidebar {
        transform: translateX(0);
    }
    
    .menu-toggle {
        display: none;
    }
}

@media (max-width: 1200px) {
    .video-grid, .suggested-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 992px) {
    .video-grid, .suggested-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .video-player-container {
        flex-direction: column;
    }
    
    .suggested-list-thumbnail {
        width: 120px;
    }
}

@media (max-width: 768px) {
    .video-info-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .share-button-video {
        align-self: flex-end;
    }
}

@media (max-width: 768px) {
    .video-grid, .suggested-grid {
        grid-template-columns: 1fr;
    }
    
    .header {
        padding: 1rem 0.5rem;
    }
    
    .logo span {
        display: none;
    }
    
    .search-container {
        margin: 0 0.5rem;
    }
    
    .share-button-video span {
        display: none;
    }
    
    .suggested-list-item {
        flex-direction: column;
    }
    
    .suggested-list-thumbnail {
        width: 100%;
    }
}