/* FCTube specific styles - extends main.css */

body {
    overflow: auto !important;
}

#app {
    overflow: auto !important;
    height: auto !important;
    max-height: none !important;
}

.content {
    overflow-y: auto;
    max-height: 100vh;
    width: 100%;
}

/* Search Bar */
.search-bar {
    margin: 20px 0;
}

.search-form {
    display: flex;
    gap: 10px;
    max-width: 600px;
}

.search-input {
    flex: 1;
    padding: 8px 12px;
    background-color: #fff;
    border: 1px solid #ccc;
    color: #000;
    border-radius: 4px;
    font-size: 14px;
    font-family: 'NotoSans', sans-serif;
    outline: none;
}

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

.search-btn {
    padding: 8px 16px;
    background: linear-gradient(
        to bottom,
        rgba(255, 255, 255, 0.25) 0%,
        rgba(117, 117, 117, 0.15) 20%,
        rgba(92, 92, 92, 0.15) 60%,
        rgba(0, 0, 0, 0.3) 60%,
        rgba(41, 41, 41, 0.3) 100%
    );
    background-color: #f00;
    color: #fff;
    border: 1px solid #0f0f0f;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-family: 'NotoSans', sans-serif;
    transition: background-color 0.2s;
}

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

/* Alerts */
.alert {
    padding: 12px 16px;
    border-radius: 4px;
    margin-bottom: 20px;
    border: 1px solid;
}

.alert-error {
    background-color: #ffe6e6;
    color: #cc0000;
    border-color: #cc0000;
}

.alert-success {
    background-color: #e6ffe6;
    color: #006600;
    border-color: #006600;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 40px 20px;
}

.empty-state h2 {
    font-size: 24px;
    margin-bottom: 10px;
    color: #000;
}

.empty-state p {
    color: #666;
    margin-bottom: 20px;
}

/* Video Grid */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.video-card {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
}

.video-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    border-color: #f44;
}

.video-card a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.video-thumbnail {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    background-color: #000;
    overflow: hidden;
}

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

.thumbnail-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #333;
    color: #fff;
    font-size: 12px;
}

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

.video-info {
    padding: 12px;
}

.video-title {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 6px;
    color: #000;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
}

.video-meta {
    font-size: 12px;
    color: #666;
    margin-bottom: 4px;
}

.video-username {
    margin-right: 8px;
    font-weight: 500;
}

.video-date {
    font-size: 11px;
    color: #888;
}

/* Upload Page */
.upload-page {
    max-width: 700px;
    margin: 0 auto;
}

.upload-container {
    background-color: #fff;
    padding: 30px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.upload-container h1 {
    margin-bottom: 20px;
    font-size: 24px;
    color: #000;
}

.upload-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-weight: 500;
    color: #000;
    font-size: 14px;
}

.form-group input,
.form-group textarea {
    padding: 10px 12px;
    background-color: #fff;
    border: 1px solid #ccc;
    color: #000;
    border-radius: 4px;
    font-size: 14px;
    font-family: 'NotoSans', sans-serif;
    outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: #f44;
}

.form-group small {
    color: #666;
    font-size: 11px;
}

.btn {
    padding: 10px 20px;
    border: 1px solid #0f0f0f;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    font-family: 'NotoSans', sans-serif;
    transition: background-color 0.2s;
    background-color: #f00;
}

.btn-primary {
    background: linear-gradient(
        to bottom,
        rgba(255, 255, 255, 0.25) 0%,
        rgba(117, 117, 117, 0.15) 20%,
        rgba(92, 92, 92, 0.15) 60%,
        rgba(0, 0, 0, 0.3) 60%,
        rgba(41, 41, 41, 0.3) 100%
    );
    background-color: #f00;
    color: #fff;
}

.btn-primary:hover {
    background-color: #f44;
}

/* Watch Page */
.watch-page {
    padding: 0;
}

.watch-container {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 20px;
    margin-top: 20px;
}

.video-player {
    width: 100%;
    background-color: #000;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid #ddd;
}

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

.video-details {
    margin-top: 16px;
}

.video-title-large {
    font-size: 18px;
    font-weight: 500;
    margin-bottom: 10px;
    color: #000;
}

.video-stats {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
    color: #666;
    font-size: 13px;
}

.video-channel {
    padding: 12px 0;
    border-top: 1px solid #ddd;
    border-bottom: 1px solid #ddd;
    margin-bottom: 12px;
}

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

.channel-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(
        to bottom,
        rgba(255, 255, 255, 0.25) 0%,
        rgba(117, 117, 117, 0.15) 20%,
        rgba(92, 92, 92, 0.15) 60%,
        rgba(0, 0, 0, 0.3) 60%,
        rgba(41, 41, 41, 0.3) 100%
    );
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 16px;
    color: #fff;
    border: 1px solid #0f0f0f;
}

.channel-name {
    font-weight: 500;
    color: #000;
}

.video-description {
    margin-top: 12px;
}

.video-description h3 {
    font-size: 14px;
    margin-bottom: 6px;
    color: #000;
}

.video-description p {
    color: #666;
    white-space: pre-wrap;
    font-size: 13px;
    line-height: 1.6;
}

/* Comments Section */
.comments-section {
    background-color: #fff !important;
    border: 1px solid #ddd !important;
    border-radius: 4px !important;
    padding: 20px !important;
    margin-top: 20px !important;
}

.comments-section h3 {
    font-size: 15px !important;
    color: #000 !important;
    margin-bottom: 20px !important;
    padding-bottom: 10px !important;
    border-bottom: 1px solid #ddd !important;
}

.comments-layout {
    display: flex !important;
    flex-direction: row !important;
    gap: 20px !important;
    align-items: flex-start !important;
}

.comments-list-wrapper {
    flex: 1 1 60% !important;
    min-width: 0 !important;
}

.comment-form-container {
    flex: 0 0 300px !important;
    padding: 15px !important;
    background-color: #f9f9f9 !important;
    border: 1px solid #ddd !important;
    border-radius: 4px !important;
    position: sticky !important;
    top: 20px !important;
}

.comment-form {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
}

.comment-form .form-group {
    display: flex !important;
    flex-direction: column !important;
    gap: 6px !important;
}

.comment-form .form-group label {
    font-weight: 500 !important;
    color: #000 !important;
    font-size: 14px !important;
}

.comment-form .form-group input,
.comment-form .form-group textarea {
    padding: 10px 12px !important;
    background-color: #fff !important;
    border: 1px solid #ccc !important;
    color: #000 !important;
    border-radius: 4px !important;
    font-size: 14px !important;
    font-family: 'NotoSans', sans-serif !important;
    outline: none !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.comment-form .form-group input:focus,
.comment-form .form-group textarea:focus {
    border-color: #f44 !important;
}

.comments-list {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    max-height: 500px !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    padding: 10px !important;
    background-color: #f5f5f5 !important;
    border: 5px solid #ddd !important;
    border-radius: 4px !important;
    margin: 0 !important;
}

.comments-list::-webkit-scrollbar {
    width: 8px !important;
}

.comments-list::-webkit-scrollbar-track {
    background: #f1f1f1 !important;
    border-radius: 4px !important;
}

.comments-list::-webkit-scrollbar-thumb {
    background: #888 !important;
    border-radius: 4px !important;
}

.comments-list::-webkit-scrollbar-thumb:hover {
    background: #555 !important;
}

.no-comments {
    color: #666 !important;
    font-style: italic !important;
    text-align: center !important;
    padding: 20px !important;
    margin: 0 !important;
}

.comment-item {
    padding: 12px 16px !important;
    background-color: #fff !important;
    border-radius: 4px !important;
    border-left: 3px solid #f44 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
    margin: 0 !important;
    display: block !important;
}

.comment-header {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    margin-bottom: 8px !important;
    flex-wrap: wrap !important;
}

.comment-username {
    font-weight: 500 !important;
    color: #000 !important;
    font-size: 14px !important;
    display: inline-block !important;
}

.comment-date {
    font-size: 11px !important;
    color: #666 !important;
    display: inline-block !important;
}

.comment-text {
    font-size: 14px !important;
    color: #333 !important;
    line-height: 1.6 !important;
    word-wrap: break-word !important;
    margin: 0 !important;
    padding: 0 !important;
    display: block !important;
}

.alert {
    padding: 12px 16px !important;
    border-radius: 4px !important;
    margin-bottom: 12px !important;
    border: 1px solid !important;
}

.alert-error {
    background-color: #ffe6e6 !important;
    color: #cc0000 !important;
    border-color: #cc0000 !important;
}

.alert-success {
    background-color: #e6ffe6 !important;
    color: #006600 !important;
    border-color: #006600 !important;
}

/* Sidebar (related videos) */
.related-sidebar {
    background-color: #fff;
    padding: 16px;
    border: 1px solid #ddd;
    border-radius: 4px;
    height: fit-content;
    max-height: calc(100vh - 200px);
    overflow-y: auto;
}

.related-sidebar h3 {
    margin-bottom: 12px;
    font-size: 14px;
    color: #000;
    font-weight: 500;
}

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

.related-video-card {
    display: flex;
    gap: 10px;
    text-decoration: none;
    color: inherit;
    padding: 6px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.related-video-card:hover {
    background-color: #f5f5f5;
}

.related-thumbnail {
    width: 140px;
    height: 78px;
    flex-shrink: 0;
    background-color: #000;
    border-radius: 3px;
    overflow: hidden;
}

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

.thumbnail-placeholder-small {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #333;
    color: #fff;
    font-size: 9px;
}

.related-info {
    flex: 1;
}

.related-info h4 {
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 4px;
    color: #000;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.3;
}

.related-meta {
    font-size: 11px;
    color: #666;
}

.related-meta span {
    margin-right: 6px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .watch-container {
        grid-template-columns: 1fr;
    }
    
    .related-sidebar {
        margin-top: 20px;
        max-height: none;
    }
}

@media (max-width: 768px) {
    .video-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 16px;
    }
    
    .upload-container {
        padding: 20px;
    }
    
    .related-thumbnail {
        width: 120px;
        height: 68px;
    }
}
