/* --- Reset y Estilos Base --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background: #2e4e5e url('../img/fondo.jpg') no-repeat center 25px;
    background-size:  130%;
    background-attachment: scroll;
    color: #333;
    font-size: 12px;
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

/* --- Pantalla de Contraseña --- */
#password-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: #2e4e5e url('../img/fondo.jpg') no-repeat center center;
    background-size: cover;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.password-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 50px 60px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    text-align: center;
    max-width: 450px;
    width: 90%;
    animation: slideUp 0.6s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.password-logo {
    font-size: 64px;
    margin-bottom: 20px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.password-title {
    font-size: 32px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 10px;
    letter-spacing: -0.5px;
}

.password-subtitle {
    font-size: 16px;
    color: #666;
    margin-bottom: 30px;
}

#password-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

#password-input {
    width: 100%;
    padding: 16px 20px;
    font-size: 16px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    outline: none;
    transition: all 0.3s ease;
    font-family: Arial, Helvetica, sans-serif;
}

#password-input:focus {
    border-color: #167ac6;
    box-shadow: 0 0 0 4px rgba(22, 122, 198, 0.1);
}

.password-submit {
    width: 100%;
    padding: 16px 20px;
    font-size: 16px;
    font-weight: 600;
    color: white;
    background: linear-gradient(135deg, #167ac6 0%, #1e5a8e 100%);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.password-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(22, 122, 198, 0.3);
}

.password-submit:active {
    transform: translateY(0);
}

.password-error {
    color: #e74c3c;
    font-size: 14px;
    margin-top: 10px;
    font-weight: 500;
    min-height: 20px;
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

#main-content {
    animation: fadeInContent 0.8s ease-in-out;
}

@keyframes fadeInContent {
    from { opacity: 0; }
    to { opacity: 1; }
}

a {
    text-decoration: none;
    color: #167ac6;
}
a:hover {
    text-decoration: underline;
}

/* --- Header de YouTube --- */
#yt-masthead {
    background: #fff;
    border-bottom: 1px solid #e8e8e8;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
    height: 50px;
    position: relative;
    z-index: 100;
}

.yt-masthead-content {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    padding: 0 20px;
}

.yt-logo {
    width: 125px;
    height: 30px;
    background: url('../img/youtube.png') no-repeat center left;
    background-size: contain;
    cursor: pointer;
}

#masthead-search {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 600px;
    margin: 0 20px;
}

#masthead-search-term {
    width: 100%;
    max-width: 500px;
    height: 28px;
    border: 1px solid #ccc;
    border-right: none;
    padding: 0 10px;
    font-size: 13px;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.1);
}

#search-btn {
    width: 65px;
    height: 28px;
    background: #f8f8f8;
    border: 1px solid #ccc;
    cursor: pointer;
    font-size: 11px;
    color: #666;
}

#search-btn:hover {
    background: #f0f0f0;
    border-color: #c6c6c6;
}

.masthead-right-btns {
    display: flex;
    gap: 10px;
}

.upload-btn, .signin-btn {
    padding: 6px 15px;
    font-size: 11px;
    font-weight: bold;
    cursor: pointer;
    border: 1px solid #ccc;
    background: #f8f8f8;
    color: #333;
    border-radius: 2px;
}

.signin-btn {
    background: #167ac6;
    color: #fff;
    border-color: #167ac6;
}

.upload-btn:hover {
    background: #e8e8e8;
}

.signin-btn:hover {
    background: #0d5b99;
}

/* --- Banner del Canal --- */
.channel-banner-wrapper {
    background: transparent;
    padding-top: 150px;
    position: relative;
}

.channel-info-overlay {
    background: #3e3e3e;
    background: linear-gradient(to bottom, #4a4a4a, #2e2e2e);
    padding: 12px 0;
    max-width: 970px;
    margin: 0 auto;
}

.channel-info-content {
    max-width: 970px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    padding: 0 15px;
}

.channel-avatar {
    width: 80px;
    height: 80px;
    background: #f0f0f0;
    border: 3px solid #fff;
    margin-right: 15px;
    overflow: hidden;
}

.channel-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.channel-title-section {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 15px;
}

.channel-title {
    font-size: 22px;
    font-weight: normal;
    color: #fff;
    margin: 0;
}

.subscribe-channel-btn {
    background: #cc181e;
    color: #fff;
    border: none;
    padding: 6px 10px;
    font-size: 11px;
    font-weight: bold;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    border-radius: 2px;
}

.subscribe-channel-btn:hover {
    background: #a11;
}

.subscribe-count {
    background: #fff;
    color: #333;
    padding: 6px 10px;
    font-size: 11px;
    font-weight: bold;
    border-radius: 2px;
}

.channel-stats-header {
    text-align: right;
    font-size: 11px;
    color: #ccc;
}

.channel-stats-header > div {
    margin-bottom: 3px;
}

.channel-stats-header .stat-number {
    font-size: 20px;
    font-weight: normal;
    color: #fff;
    display: block;
}

/* --- Barra de Navegación --- */
.channel-nav {
    background: #2e2e2e;
    border-bottom: none;
    max-width: 970px;
    margin: 0 auto;
}

.channel-nav-content {
    max-width: 970px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 15px;
}

.channel-tabs {
    display: flex;
}

.channel-tab {
    padding: 10px 20px;
    color: #999;
    cursor: pointer;
    font-size: 13px;
    font-weight: bold;
    border-bottom: 3px solid transparent;
}

.channel-tab.active {
    color: #fff;
    border-bottom-color: #fff;
}

.channel-tab:hover {
    color: #fff;
}

.channel-search {
    padding: 5px 10px;
    border: 1px solid #555;
    background: #3a3a3a;
    color: #999;
    font-size: 11px;
    width: 200px;
}

.channel-search::placeholder {
    color: #666;
}

/* --- Contenedor Principal --- */
.main-container {
    max-width: 970px;
    margin: 0 auto;
    padding: 0 10px;
}

/* --- Featured Section --- */
.featured-wrapper {
    background: #fff;
}

.featured-layout {
    display: flex;
    gap: 10px;
}

.featured-left {
    width: 640px;
}

.featured-right {
    width: 320px;
}

/* --- Contenido Principal (Dos Columnas) --- */
.content-layout {
    display: flex;
    gap: 10px;
}

.left-column {
    width: 640px;
}

.right-column {
    width: 320px;
}

/* --- Reproductor de Video --- */
.video-player-container {
    width: 640px;
    height: 390px;
    background-color: #000;
    margin-bottom: 10px;
    border: 1px solid #ccc;
}

.video-player-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* --- Featured GIF Container --- */
.featured-gif-container {
    width: 640px;
    height: 390px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    margin-bottom: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.featured-gif {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.featured-channel-description {
    margin: 8px 0;
    padding: 12px;
    background: #f9f9f9;
    border: 1px solid #e8e8e8;
    border-radius: 2px;
}

.featured-channel-description p {
    font-size: 13px;
    line-height: 1.4;
    color: #333;
    margin: 0;
}



/* --- Información del Video --- */
.video-info-wrapper {
    background: #fff;
    padding: 12px;
    border: 1px solid #e8e8e8;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.video-title {
    font-size: 18px;
    font-weight: normal;
    margin-bottom: 8px;
    color: #333;
    line-height: 1.3;
}

.video-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e8e8e8;
}

.uploader-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.uploader-avatar {
    width: 48px;
    height: 48px;
    background: #f0f0f0;
    border: 1px solid #ccc;
    overflow: hidden;
}

.uploader-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.uploader-details {
    display: flex;
    flex-direction: column;
}

.uploader-name {
    font-weight: bold;
    color: #167ac6;
    font-size: 13px;
}

.subscribe-btn {
    background: linear-gradient(to bottom, #f8f8f8, #e8e8e8);
    border: 1px solid #ccc;
    padding: 5px 15px;
    font-size: 11px;
    font-weight: bold;
    color: #333;
    cursor: pointer;
    border-radius: 2px;
}

.subscribe-btn:hover {
    background: linear-gradient(to bottom, #f0f0f0, #e0e0e0);
}

.video-stats {
    display: flex;
    align-items: center;
    gap: 15px;
}

.stat-item {
    font-size: 11px;
    color: #666;
}

.stat-number {
    font-weight: bold;
    color: #333;
}

.video-actions {
    display: flex;
    gap: 5px;
    padding: 10px 0;
    border-bottom: 1px solid #e8e8e8;
}

.action-btn {
    background: #f8f8f8;
    border: 1px solid #d3d3d3;
    padding: 5px 10px;
    font-size: 11px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
}

.action-btn:hover {
    background: #e8e8e8;
}

/* --- Barra Lateral (Sidebar) --- */
.sidebar-module {
    background: #fff;
    border: 1px solid #e8e8e8;
    margin-bottom: 10px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.sidebar-module-header {
    background: #f8f8f8;
    border-bottom: 1px solid #e8e8e8;
    padding: 8px 12px;
    font-size: 13px;
    font-weight: bold;
    color: #333;
}

.sidebar-module-content {
    padding: 12px;
}

.about-text {
    font-size: 12px;
    line-height: 1.5;
    color: #666;
    margin-bottom: 12px;
}

.social-links {
    margin: 12px 0;
}

.social-link {
    display: block;
    padding: 5px 0;
    font-size: 12px;
    color: #167ac6;
    font-weight: bold;
}

.social-link:before {
    content: "";
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-right: 5px;
    vertical-align: middle;
}

.about-stats {
    list-style: none;
    font-size: 11px;
    color: #666;
    border-top: 1px solid #e8e8e8;
    padding-top: 10px;
    margin-top: 10px;
}

.about-stats li {
    padding: 4px 0;
    display: flex;
    justify-content: space-between;
}

.about-stats strong {
    color: #333;
}

/* --- Videos Relacionados --- */
.related-video {
    display: flex;
    margin-bottom: 10px;
    cursor: pointer;
    gap: 8px;
}

.related-video:hover .related-video-title {
    color: #167ac6;
}

.related-video-thumb {
    width: 120px;
    height: 90px;
    background: #000;
    flex-shrink: 0;
    position: relative;
}

.related-video-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-duration {
    position: absolute;
    bottom: 2px;
    right: 2px;
    background: rgba(0,0,0,0.8);
    color: #fff;
    padding: 2px 4px;
    font-size: 10px;
    font-weight: bold;
}

.related-video-info {
    flex: 1;
}

.related-video-title {
    font-size: 12px;
    font-weight: bold;
    color: #167ac6;
    margin-bottom: 4px;
    line-height: 1.3;
}

.related-video-author {
    font-size: 11px;
    color: #666;
    margin-bottom: 2px;
}

.related-video-stats {
    font-size: 10px;
    color: #999;
}

/* --- Sección de Videos Subidos --- */
.uploaded-section {
    background: #fff;
    border: 1px solid #e8e8e8;
    padding: 15px;
    margin-top: 20px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.section-header {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 15px;
    color: #333;
    border-bottom: 1px solid #e8e8e8;
    padding-bottom: 10px;
}

.uploaded-videos-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

.uploaded-video-item {
    cursor: pointer;
}

.uploaded-video-item:hover .uploaded-video-title {
    color: #167ac6;
}

.uploaded-video-thumb {
    width: 100%;
    height: 105px;
    background: #000;
    margin-bottom: 5px;
    position: relative;
}

.uploaded-video-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.uploaded-video-title {
    font-size: 11px;
    font-weight: bold;
    color: #167ac6;
    margin-bottom: 3px;
    line-height: 1.3;
}

.uploaded-video-meta {
    font-size: 10px;
    color: #999;
}

/* --- Browse Videos Section --- */
#browse-videos-content {
    background: #fff;
    max-width: 970px;
    margin: 0 auto;
}

.browse-subnav {
    background: #e8e8e8;
    border-bottom: 1px solid #ccc;
    padding: 0 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.browse-subtabs {
    display: flex;
}

.browse-subtab {
    padding: 10px 15px;
    cursor: pointer;
    font-size: 12px;
    font-weight: bold;
    color: #666;
    border-bottom: 3px solid transparent;
}

.browse-subtab.active {
    background: #fff;
    color: #333;
    border-bottom-color: transparent;
}

.browse-subtab:hover {
    background: #f5f5f5;
}

.view-selector select {
    padding: 5px 10px;
    border: 1px solid #ccc;
    background: #fff;
    font-size: 11px;
    cursor: pointer;
}

/* --- Categories Section --- */
.categories-section {
    padding: 20px;
    background: #fff;
    width: 100%;
    box-sizing: border-box;
    flex: 1 1 100%;
}

.categories-title {
    font-size: 16px;
    font-weight: bold;
    color: #333;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e8e8e8;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.category-card {
    background: #f9f9f9;
    border: 1px solid #e8e8e8;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.category-card:hover {
    background: #f0f0f0;
    border-color: #167ac6;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.category-card.active {
    background: #167ac6;
    border-color: #167ac6;
}

.category-card.active .category-icon,
.category-card.active .category-name,
.category-card.active .category-count {
    color: #fff;
}

.category-icon {
    font-size: 32px;
    margin-bottom: 10px;
}

.category-name {
    font-size: 13px;
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
}

.category-count {
    font-size: 11px;
    color: #666;
}

/* --- More Section --- */
.more-section {
    padding: 40px 20px;
    background: #fff;
    width: 100%;
    box-sizing: border-box;
    flex: 1 1 100%;
}

.more-content {
    max-width: 600px;
    margin: 0 auto;
}

.download-box {
    background: #f9f9f9;
    border: 2px solid #e8e8e8;
    border-radius: 8px;
    padding: 40px;
    text-align: center;
}

.download-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.download-title {
    font-size: 20px;
    font-weight: bold;
    color: #333;
    margin-bottom: 15px;
}

.download-description {
    font-size: 14px;
    line-height: 1.6;
    color: #666;
    margin-bottom: 25px;
}

.download-button {
    display: inline-block;
    background: #167ac6;
    color: white;
    padding: 12px 30px;
    font-size: 14px;
    font-weight: bold;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.download-button:hover {
    background: #125a94;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* --- Comments Section --- */
.comments-section {
    padding: 40px 20px;
    background: #fff;
    width: 100%;
    box-sizing: border-box;
    flex: 1 1 100%;
}

.comments-content {
    max-width: 600px;
    margin: 0 auto;
}

.comments-box {
    background: #f9f9f9;
    border: 2px solid #e8e8e8;
    border-radius: 8px;
    padding: 40px;
}

.comments-title {
    font-size: 16px;
    font-weight: bold;
    color: #333;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e8e8e8;
}

.giscus-wrapper {
    margin-bottom: 0;
}

.comments-instructions {
    background: #f9f9f9;
    border: 1px solid #e8e8e8;
    border-radius: 4px;
    padding: 20px;
    margin-top: 20px;
}

.comments-instructions p {
    margin: 0 0 10px 0;
    font-size: 13px;
    line-height: 1.6;
    color: #333;
}

.comments-instructions strong {
    font-size: 14px;
}

.comments-instructions ol {
    margin: 10px 0 10px 20px;
    padding: 0;
    font-size: 13px;
    line-height: 1.8;
    color: #666;
}

.comments-instructions li {
    margin-bottom: 5px;
}

.comments-instructions a {
    color: #167ac6;
    text-decoration: none;
}

.comments-instructions a:hover {
    text-decoration: underline;
}

.comments-instructions code {
    background: #e8e8e8;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: monospace;
    font-size: 12px;
}

.browse-videos-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 15px;
    padding: 15px;
    background: #fff;
    overflow: hidden;
}

.browse-video-item {
    background: #fff;
    border: 1px solid #e8e8e8;
    cursor: pointer;
}

.browse-video-item:hover {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.browse-video-thumb {
    width: 100%;
    height: 140px;
    background: #000;
    position: relative;
}

.browse-video-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.browse-video-info {
    padding: 8px;
}

.browse-video-title {
    font-size: 12px;
    font-weight: bold;
    color: #167ac6;
    margin-bottom: 4px;
    line-height: 1.3;
}

.browse-video-stats {
    font-size: 11px;
    color: #666;
}

.browse-video-date {
    font-size: 10px;
    color: #999;
}

.browse-sidebar {
    width: 300px;
    padding: 15px 15px 15px 0;
}

#browse-videos-content .content-layout {
    display: flex;
    gap: 10px;
    background: transparent;
    flex-wrap: nowrap;
    max-width: 950px;
    margin: 0 auto;
}

#browse-videos-content .browse-videos-grid {
    background: #f5f5f5;
    width: 640px;
    flex-shrink: 0;
}

#browse-videos-content .browse-sidebar {
    flex-shrink: 0;
}

#featured-content .left-column {
    width: 640px;
}

#featured-content .right-column {
    width: 320px;
}



/* --- Channel Items --- */
.channel-item {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    cursor: pointer;
}

.channel-thumb {
    width: 40px;
    height: 40px;
    background: #f0f0f0;
    border: 1px solid #ccc;
    flex-shrink: 0;
}

.channel-info {
    flex: 1;
}

.channel-name {
    font-size: 12px;
    font-weight: bold;
    color: #167ac6;
    margin-bottom: 2px;
}

.channel-role {
    font-size: 11px;
    color: #666;
    line-height: 1.3;
}

.channel-group-title {
    font-size: 13px;
    font-weight: bold;
    color: #333;
    margin: 10px 0 6px;
}

.channel-subs {
    font-size: 10px;
    color: #999;
}

/* --- Paginación --- */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 30px 0;
    margin-top: 20px;
    width: 100%;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

.page-btn {
    padding: 6px 12px;
    background: #f4f4f4;
    border: 1px solid #ccc;
    color: #333;
    font-size: 12px;
    cursor: pointer;
    border-radius: 2px;
    transition: all 0.2s;
}

.page-btn:hover {
    background: #e8e8e8;
    border-color: #999;
}

.page-btn.active {
    background: #cc181e;
    color: white;
    border-color: #cc181e;
    font-weight: bold;
}

.page-dots {
    color: #666;
    padding: 0 5px;
}

.next-btn {
    font-weight: bold;
}

