/* Reset e configurações básicas */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: #0f0f0f;
    color: #ffffff;
    line-height: 1.6;
}

/* Header */
.header {
    background-color: #212121;
    padding: 0 16px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    border-bottom: 1px solid #303030;
}

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

.logo {
    display: flex;
    align-items: center;
    font-size: 20px;
    font-weight: bold;
    color: #ff0000;
}

.logo i {
    font-size: 24px;
    margin-right: 8px;
}

.search-bar {
    display: flex;
    flex: 1;
    max-width: 640px;
    margin: 0 40px;
}

.search-bar input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #303030;
    border-radius: 2px 0 0 2px;
    background-color: #121212;
    color: #ffffff;
    font-size: 16px;
    outline: none;
}

.search-bar input:focus {
    border-color: #065fd4;
}

.search-btn {
    padding: 8px 20px;
    border: 1px solid #303030;
    border-left: none;
    border-radius: 0 2px 2px 0;
    background-color: #303030;
    color: #ffffff;
    cursor: pointer;
    transition: background-color 0.2s;
}

.search-btn:hover {
    background-color: #404040;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.action-btn {
    padding: 8px;
    border: none;
    background: none;
    color: #ffffff;
    cursor: pointer;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

.action-btn:hover {
    background-color: #303030;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: #065fd4;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

/* Main Container */
.main-container {
    display: flex;
    margin-top: 56px;
    min-height: calc(100vh - 56px);
    gap: 24px;
    padding: 24px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

/* Video Section */
.video-section {
    flex: 1;
    min-width: 0;
}

.video-player {
    position: relative;
    width: 100%;
    background-color: #000;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.video-player video {
    width: 100%;
    height: auto;
    display: block;
    max-height: 70vh;
}

.video-info {
    margin-top: 20px;
}

.video-title {
    font-size: 20px;
    font-weight: 400;
    margin-bottom: 12px;
    line-height: 1.3;
}

.video-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid #303030;
}

.video-stats {
    display: flex;
    gap: 16px;
    color: #aaaaaa;
    font-size: 14px;
}

.video-stats span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.video-actions {
    display: flex;
    gap: 8px;
}

.video-actions .action-btn {
    padding: 8px 16px;
    border-radius: 18px;
    background-color: #272727;
    color: #ffffff;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    height: auto;
    width: auto;
}

.video-actions .action-btn:hover {
    background-color: #3f3f3f;
}

.video-actions .action-btn i {
    margin-right: 6px;
}

.like-btn.active {
    background-color: #065fd4;
}

.dislike-btn.active {
    background-color: #cc0000;
}

/* Speed Control */
.speed-control {
    position: relative;
    display: inline-block;
}

.speed-btn {
    display: flex;
    align-items: center;
    gap: 6px;
}

.speed-text {
    font-weight: 600;
    min-width: 35px;
    text-align: left;
}

.speed-menu {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #212121;
    border: 1px solid #404040;
    border-radius: 8px;
    padding: 8px 0;
    margin-bottom: 8px;
    min-width: 140px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: 1000;
}

.speed-menu.show {
    opacity: 1;
    visibility: visible;
}

.speed-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 16px;
    cursor: pointer;
    transition: background-color 0.2s;
    font-size: 14px;
}

.speed-option:hover {
    background-color: #404040;
}

.speed-option.active {
    background-color: #065fd4;
    color: #ffffff;
}

.speed-option.active .speed-value {
    font-weight: 600;
}

.speed-value {
    color: #aaaaaa;
    font-size: 12px;
}

.speed-option.active .speed-value {
    color: #ffffff;
}

/* Sidebar */
.sidebar {
    width: 402px;
    flex-shrink: 0;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.sidebar-header h3 {
    font-size: 16px;
    font-weight: 500;
}

.autoplay-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: none;
    color: #aaaaaa;
    cursor: pointer;
    font-size: 14px;
}

.autoplay-toggle i {
    color: #065fd4;
}

/* Video List */
.video-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.video-item {
    display: flex;
    gap: 8px;
    padding: 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.video-item:hover {
    background-color: #272727;
}

.video-item.active {
    background-color: #065fd4;
}

.video-thumbnail {
    position: relative;
    width: 168px;
    height: 94px;
    border-radius: 8px;
    overflow: hidden;
    background-color: #000;
    flex-shrink: 0;
}

.video-thumbnail video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-duration {
    position: absolute;
    bottom: 4px;
    right: 4px;
    background-color: rgba(0, 0, 0, 0.8);
    color: #ffffff;
    padding: 2px 6px;
    border-radius: 2px;
    font-size: 12px;
    font-weight: 500;
}

.video-details {
    flex: 1;
    min-width: 0;
}

.video-details .video-title {
    font-size: 14px;
    font-weight: 500;
    line-height: 1.3;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.video-details .video-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 12px;
    color: #aaaaaa;
    border: none;
    padding: 0;
}

.video-details .video-meta span {
    line-height: 1.2;
}

/* No Video State */
.no-video {
    text-align: center;
    padding: 60px 20px;
    color: #aaaaaa;
}

.no-video i {
    font-size: 64px;
    margin-bottom: 16px;
    color: #606060;
}

.no-video h2 {
    font-size: 24px;
    margin-bottom: 8px;
    color: #ffffff;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .main-container {
        flex-direction: column;
        padding: 16px;
    }
    
    .sidebar {
        width: 100%;
    }
    
    .video-item {
        flex-direction: row;
    }
    
    .video-thumbnail {
        width: 120px;
        height: 68px;
    }
}

@media (max-width: 768px) {
    .header-content {
        padding: 0 8px;
    }
    
    .search-bar {
        margin: 0 16px;
        max-width: none;
    }
    
    .main-container {
        padding: 12px;
        gap: 16px;
    }
    
    .video-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .video-actions {
        flex-wrap: wrap;
    }
    
    .video-actions .action-btn {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    .speed-menu {
        position: fixed;
        bottom: 60px;
        left: 50%;
        transform: translateX(-50%);
        width: 200px;
    }
    
    .speed-text {
        min-width: 30px;
    }
}

@media (max-width: 480px) {
    .search-bar {
        display: none;
    }
    
    .header-actions {
        gap: 4px;
    }
    
    .main-container {
        padding: 8px;
    }
    
    .video-title {
        font-size: 18px;
    }
    
    .video-item {
        padding: 6px;
    }
    
    .video-thumbnail {
        width: 100px;
        height: 56px;
    }
    
    .video-details .video-title {
        font-size: 13px;
    }
}

/* Scrollbar customization */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #0f0f0f;
}

::-webkit-scrollbar-thumb {
    background: #606060;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #808080;
}

/* Loading animation */
@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

.loading {
    animation: pulse 1.5s infinite;
}