/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Roboto', sans-serif;
}

body {
    background-color: #f9f9f9;
    color: #030303;
}

/* Header Styles */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 56px;
    background-color: white;
    display: flex;
    align-items: center;
    padding: 0 16px;
    justify-content: space-between;
    border-bottom: 1px solid #ddd;
    z-index: 100;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.menu-btn {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
}

.menu-btn:hover {
    background-color: #f2f2f2;
}

.logo {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 20px;
    font-weight: bold;
    color: #030303;
    text-decoration: none;
    color: inherit;
}

.logo i {
    color: #ff0000;
}

.header-center {
    flex: 1;
    max-width: 640px;
    margin: 0 16px;
}

.search-form {
    display: flex;
    align-items: center;
    width: 100%;
}

.search-input {
    flex: 1;
    height: 40px;
    padding: 0 16px;
    border: 1px solid #ccc;
    border-radius: 20px 0 0 20px;
    font-size: 16px;
    outline: none;
}

.search-input:focus {
    border-color: #1c62b9;
}

.search-btn {
    height: 40px;
    padding: 0 24px;
    background-color: #f8f8f8;
    border: 1px solid #ccc;
    border-left: none;
    border-radius: 0 20px 20px 0;
    cursor: pointer;
}

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

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.icon-btn {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
}

.icon-btn:hover {
    background-color: #f2f2f2;
}

.profile-img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
}

/* Container and Sidebar */
.container {
    display: flex;
    margin-top: 56px;
    height: calc(100vh - 56px);
}

.sidebar {
    position: fixed;
    left: 0;
    top: 56px;
    bottom: 0;
    width: 240px;
    background-color: white;
    padding: 12px 0;
    overflow-y: auto;
    transition: transform 0.3s ease;
}

.sidebar.collapsed {
    transform: translateX(-240px);
}

.sidebar-section {
    padding: 8px 0;
    border-bottom: 1px solid #e5e5e5;
}

.sidebar-section h3 {
    padding: 8px 24px;
    font-size: 14px;
    color: #606060;
}

.sidebar-item {
    display: flex;
    align-items: center;
    padding: 8px 24px;
    gap: 24px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.sidebar-item:hover {
    background-color: #f2f2f2;
}

.sidebar-item.active {
    background-color: #e5e5e5;
}

.sidebar-item i {
    font-size: 20px;
    width: 24px;
    text-align: center;
}

.channel-img {
    width: 24px;
    height: 24px;
    border-radius: 50%;
}

/* Main Content */
.main-content {
    margin-left: 240px;
    padding: 24px;
    flex: 1;
    transition: margin-left 0.3s ease;
    width: 100%;
    padding: 0;
}

.main-content.expanded {
    margin-left: 0;
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 24px;
    padding: 24px;
}

/* Video Card Styles */
.video-card {
    cursor: pointer;
}

.thumbnail {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
    background-color: #000;
    border-radius: 12px;
    overflow: hidden;
}

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

.video-duration {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 3px 4px;
    border-radius: 4px;
    font-size: 12px;
}

.video-info {
    padding: 12px 0;
}

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

.channel-name {
    font-size: 14px;
    color: #606060;
    margin-bottom: 2px;
}

.video-stats {
    font-size: 14px;
    color: #606060;
}

/* Video Modal Styles */
.video-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

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

.close-button {
    position: absolute;
    top: -40px;
    right: 0;
    color: white;
    font-size: 30px;
    cursor: pointer;
    z-index: 1001;
    padding: 10px;
}

.close-button:hover {
    color: #ff0000;
}

/* Responsive adjustments for modal */
@media (max-width: 768px) {
    .modal-content {
        width: 100%;
        height: 100%;
    }
    
    .close-button {
        top: 10px;
        right: 10px;
    }
}

/* Add transition for sidebar collapse */
.sidebar {
    transition: transform 0.3s ease;
}

.sidebar.collapsed {
    transform: translateX(-240px);
}

.main-content {
    transition: margin-left 0.3s ease;
}

.main-content.expanded {
    margin-left: 0;
}

/* Watch Page Styles */
.page {
    width: 100%;
}

.page.hidden {
    display: none;
}

.watch-flex {
    display: flex;
    gap: 24px;
    padding: 24px;
    max-width: 1800px;
    margin: 0 auto;
}

.primary {
    flex: 1;
    min-width: 0;
}

.secondary {
    width: 400px;
    flex-shrink: 0;
}

@media (max-width: 1000px) {
    .watch-flex {
        flex-direction: column;
    }
    .secondary {
        width: 100%;
    }
}

.player-container {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    background: #000;
    margin-bottom: 24px;
}

#player {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.video-info-container {
    color: #030303;
}

.watch-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 12px;
    line-height: 1.4;
}

.watch-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 12px;
    border-bottom: 1px solid #e5e5e5;
    margin-bottom: 12px;
}

.channel-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.channel-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.channel-meta {
    display: flex;
    flex-direction: column;
}

.channel-name {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 2px;
}

.subscriber-count {
    font-size: 12px;
    color: #606060;
}

.subscribe-btn {
    background: #cc0000;
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    margin-left: 12px;
}

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

.action-btn {
    background: #f2f2f2;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.action-btn:hover {
    background: #e5e5e5;
}

.video-description {
    background: #f2f2f2;
    padding: 12px;
    border-radius: 12px;
    margin-top: 12px;
    font-size: 14px;
    line-height: 1.5;
    white-space: pre-wrap;
}

.related-videos {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.related-video-card {
    display: flex;
    gap: 8px;
    cursor: pointer;
}

.related-thumbnail {
    width: 168px;
    height: 94px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

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

.related-info {
    flex: 1;
    min-width: 0;
}

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

.related-channel {
    font-size: 12px;
    color: #606060;
}

.related-meta {
    font-size: 12px;
    color: #606060;
}

/* Add these styles */
.sign-in-btn {
    background: #cc0000;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    margin-right: 8px;
}

.user-menu {
    position: absolute;
    top: 48px;
    right: 8px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    width: 300px;
    z-index: 1000;
}

.user-menu.hidden {
    display: none;
}

.user-info {
    padding: 16px;
    border-bottom: 1px solid #e5e5e5;
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.user-details {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-weight: 500;
    font-size: 16px;
}

.user-email {
    color: #606060;
    font-size: 14px;
}

.menu-items {
    padding: 8px;
}

.menu-items button {
    width: 100%;
    padding: 8px 16px;
    border: none;
    background: none;
    text-align: left;
    font-size: 14px;
    cursor: pointer;
    border-radius: 8px;
}

.menu-items button:hover {
    background: #f2f2f2;
}

.user-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: transparent;
    z-index: 999;
}

.user-menu-overlay.hidden {
    display: none;
}

/* Update existing styles */
.like-btn.active,
.dislike-btn.active {
    background: #e5e5e5;
    color: #065fd4;
}

.subscribe-btn.subscribed {
    background: #f2f2f2;
    color: #606060;
}

/* Add comment styles */
.comments-section {
    margin-top: 24px;
    border-top: 1px solid #e5e5e5;
    padding-top: 24px;
}

.comment-form {
    display: flex;
    gap: 16px;
    margin-bottom: 32px;
}

.comment-form img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.comment-input-container {
    flex: 1;
}

.comment-input {
    width: 100%;
    border: none;
    border-bottom: 1px solid #e5e5e5;
    padding: 8px 0;
    font-size: 14px;
    outline: none;
}

.comment-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 8px;
}

.comment {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
}

.comment-content {
    flex: 1;
}

.comment-content h4 {
    margin: 0 0 4px 0;
    font-size: 14px;
}

.comment-content p {
    margin: 0;
    font-size: 14px;
    line-height: 1.4;
}

.comment-actions button {
    background: none;
    border: none;
    padding: 8px;
    font-size: 14px;
    color: #606060;
    cursor: pointer;
}

.comment-actions button:hover {
    color: #030303;
} 