/*
Theme Name: Video Lobby
Theme URI: https://example.com
Author: Custom
Description: Plantilla para lobby de videos con posts recientes, populares, miniaturas y redirección. Telegram y Segunda Parte en entradas.
Version: 1.1
License: GNU General Public License v2 or later
Text Domain: video-lobby
*/

* { margin: 0; padding: 0; box-sizing: border-box; }

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

a { color: #ff2d55; text-decoration: none; }
a:hover { color: #ff6b8a; }

.site-header {
    background: #1a1a1a;
    padding: 1rem 2rem;
    border-bottom: 2px solid #ff2d55;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}
.site-title { font-size: 1.8rem; font-weight: bold; }
.site-title a { color: #fff; }

.lobby-section { padding: 2rem; max-width: 1400px; margin: 0 auto; }
.section-title {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    color: #ff2d55;
    border-bottom: 3px solid #ff2d55;
    padding-bottom: 0.5rem;
    display: inline-block;
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.post-card {
    background: #1e1e1e;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}
.post-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 30px rgba(255, 45, 85, 0.3);
}

.post-thumbnail {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    overflow: hidden;
    background: #000;
}
.post-thumbnail img,
.mini-video {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
}
.mini-video video,
.mini-video iframe {
    width: 100%; height: 100%;
    object-fit: cover;
    pointer-events: none;
}

.play-overlay {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 45, 85, 0.9);
    border-radius: 50%;
    width: 60px; height: 60px;
    display: flex; align-items: center; justify-content: center;
    font-size: 24px; color: #fff;
    opacity: 0; transition: opacity 0.3s;
}
.post-card:hover .play-overlay { opacity: 1; }

.post-content { padding: 1rem; }
.post-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.post-title a { color: #fff; }
.post-meta { font-size: 0.85rem; color: #aaa; }

.single-container { max-width: 900px; margin: 2rem auto; padding: 0 1rem; }
.single-title { font-size: 2rem; margin-bottom: 1.5rem; text-align: center; }

.telegram-banner {
    background: linear-gradient(135deg, #0088cc, #00aaff);
    padding: 1.2rem;
    border-radius: 12px;
    text-align: center;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 15px rgba(0, 136, 204, 0.4);
    animation: pulse 2s infinite;
}
@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}
.telegram-btn {
    color: #fff !important;
    font-size: 1.3rem;
    font-weight: bold;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}
.telegram-btn::before { content: "✈️"; font-size: 1.5rem; }

.video-wrapper {
    position: relative;
    margin: 1.5rem 0;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
}
.video-wrapper iframe,
.video-wrapper video,
.video-wrapper embed {
    width: 100%;
    height: auto;
    min-height: 400px;
    display: block;
}

/* Overlay para capturar el play y redirigir */
.video-play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999;
    cursor: pointer;
    background: rgba(0,0,0,0.01); /* casi invisible pero captura eventos */
}

.second-part { text-align: center; margin: 2rem 0; }
.second-part-btn {
    background: linear-gradient(135deg, #ff2d55, #ff6b8a);
    color: #fff !important;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    font-size: 1.2rem;
    font-weight: bold;
    display: inline-block;
    box-shadow: 0 4px 15px rgba(255, 45, 85, 0.4);
    transition: all 0.3s;
}
.second-part-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(255, 45, 85, 0.6);
}

.site-footer {
    background: #1a1a1a;
    text-align: center;
    padding: 2rem;
    margin-top: 3rem;
    border-top: 1px solid #333;
    color: #aaa;
}

@media (max-width: 768px) {
    .posts-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 1rem; }
    .site-header { padding: 1rem; }
    .site-title { font-size: 1.4rem; }
    .single-title { font-size: 1.5rem; }
    .telegram-btn { font-size: 1.1rem; }
}
