* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 50%, #16213e 100%);
    color: white;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
    padding-top: 100px;
}

/* Header Styles */
.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 40px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: all 0.3s ease;
}

.logo-icon:hover {
    transform: scale(1.05);
}

.logo-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: all 0.3s ease;
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-text .title {
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, #ffffff 0%, #00ff88 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
}

.logo-text .subtitle {
    font-size: 12px;
    color: #888;
    font-weight: 500;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
}

.user-avatar {
    width: 32px;
    height: 32px;
    background: #4CAF50;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
}

/* Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* Tabs Navigation */
.tabs {
    display: flex;
    gap: 40px;
    margin-bottom: 40px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.tab {
    padding: 15px 0;
    font-size: 18px;
    font-weight: 500;
    color: #888;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    position: relative;
}

.tab.active {
    color: #fff;
    border-bottom-color: #00ff88;
}

.tab:hover {
    color: #fff;
}

/* Search Bar */
.search-bar {
    margin-bottom: 40px;
    position: relative;
}

.search-input {
    width: 100%;
    padding: 15px 50px 15px 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    color: white;
    font-size: 16px;
    outline: none;
    transition: all 0.3s ease;
}

.search-input:focus {
    border-color: #00ff88;
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.2);
}

.search-input::placeholder {
    color: #888;
}

.search-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    color: #888;
    pointer-events: none;
}

/* Content Grid */
.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

/* Card Styles */
.card {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 25px;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #00ff88, #00d4ff);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

.card:hover::before {
    opacity: 1;
}

.card-category {
    display: inline-block;
    background: rgba(0, 255, 136, 0.2);
    color: #00ff88;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 15px;
}

.card-category.videos {
    background: rgba(255, 107, 107, 0.2);
    color: #ff6b6b;
}

.card-category.imagen {
    background: rgba(74, 144, 226, 0.2);
    color: #4a90e2;
}

.card-category.codigo {
    background: rgba(156, 39, 176, 0.2);
    color: #9c27b0;
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
    line-height: 1.4;
}

.card-description {
    font-size: 14px;
    color: #ccc;
    line-height: 1.5;
    margin-bottom: 15px;
}

/* Tags Styles */
.card-tags {
    margin: 10px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tag {
    background: rgba(255, 255, 255, 0.1);
    color: #888;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.tag:hover {
    background: rgba(0, 255, 136, 0.2);
    color: #00ff88;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.card-actions {
    display: flex;
    gap: 10px;
}

.action-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
}

.action-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.card-status {
    font-size: 12px;
    color: #888;
}

/* Scroll to Top Button */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #00ff88 0%, #00d4ff 100%);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(0, 255, 136, 0.3);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.8);
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.scroll-to-top:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 8px 30px rgba(0, 255, 136, 0.5);
}

.scroll-to-top:active {
    transform: translateY(-2px) scale(1.05);
}

.scroll-arrow {
    font-size: 20px;
    font-weight: bold;
    color: #000;
    line-height: 1;
    transition: transform 0.2s ease;
}

.scroll-to-top:hover .scroll-arrow {
    transform: translateY(-2px);
}

/* Efecto de pulsación suave */
@keyframes pulse {
    0% {
        box-shadow: 0 4px 20px rgba(0, 255, 136, 0.3);
    }
    50% {
        box-shadow: 0 4px 25px rgba(0, 255, 136, 0.4);
    }
    100% {
        box-shadow: 0 4px 20px rgba(0, 255, 136, 0.3);
    }
}

.scroll-to-top.visible {
    animation: pulse 3s infinite ease-in-out;
}

/* Loading Animation */
.loading {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 200px;
    font-size: 18px;
    color: #888;
    grid-column: 1 / -1;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top: 3px solid #00ff88;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Footer */
.footer {
    background: rgba(255, 255, 255, 0.02);
    padding: 40px 0;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    margin-top: 80px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.footer-link {
    color: #94a3b8;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.footer-link:hover {
    color: #00ff88;
}

.footer-copyright {
    color: #64748b;
    font-size: 14px;
    margin: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header {
        padding: 15px 20px;
    }
    
    .container {
        padding: 20px 15px;
    }
    
    .tabs {
        gap: 20px;
        overflow-x: auto;
    }
    
    .content-grid {
        grid-template-columns: 1fr;
    }
    
    .logo-text {
        display: none;
    }
    
    .logo-icon {
        width: 50px;
        height: 50px;
    }
    
    .scroll-to-top {
        width: 45px;
        height: 45px;
        bottom: 20px;
        right: 20px;
    }
    
    .scroll-arrow {
        font-size: 18px;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 15px;
    }
}

/* ====== MODAL (prompt.html) ====== */
.modal{
  display:none;
  position:fixed; z-index:2000; inset:0;
  background:rgba(0,0,0,.95); backdrop-filter:blur(10px);
}
.modal-content{
  position:relative; margin:2% auto; width:90%; max-width:1000px; height:90vh;
  display:flex; gap:30px; background:rgba(20,20,20,.95);
  border-radius:15px; padding:30px; border:1px solid rgba(255,255,255,.1);
}
.modal-close{
  position:absolute; top:15px; right:25px; color:#aaa; font-size:30px;
  font-weight:bold; cursor:pointer; transition:.3s;
}
.modal-close:hover{ color:#fff; }

.modal-left{ flex:2; display:flex; align-items:center; justify-content:center; }
.modal-right{ flex:1; display:flex; flex-direction:column; gap:20px; padding:20px 0; }

.modal-title-row{ display:flex; align-items:center; justify-content:space-between; gap:12px; }
.modal-title{ font-size:22px; font-weight:600; color:#fff; margin-bottom:10px; }

.modal-prompt-box{ flex:1; display:flex; flex-direction:column; }
.modal-prompt-box label{ font-size:14px; font-weight:600; color:#00ff88; margin-bottom:10px; }

.modal-prompt{
  background:rgba(0,0,0,.6); border:1px solid rgba(255,255,255,.2); border-radius:8px;
  padding:15px; color:#e0e0e0; font-family:Consolas,Monaco,monospace;
  font-size:13px; line-height:1.5; resize:none; outline:none; flex:1; min-height:200px;
}

/* Botones del modal */
.modal-actions{ display:flex; flex-direction:column; gap:12px; }
.modal-btn{ padding:12px 20px; border-radius:8px; font-size:14px; font-weight:600; cursor:pointer; border:none; transition:.3s; }
.modal-btn.primary{ background:linear-gradient(135deg,#00ff88 0%,#00d4ff 100%); color:#000; }
.modal-btn.primary:hover{ transform:translateY(-2px); box-shadow:0 5px 15px rgba(0,255,136,.4); }
.modal-btn.secondary{ background:rgba(255,255,255,.1); border:1px solid rgba(255,255,255,.2); color:#fff; }
.modal-btn.secondary:hover{ background:rgba(255,255,255,.2); border-color:rgba(0,255,136,.3); }

/* Miniatura del modal (arriba) */
.modal-image,
#videoThumb{
  max-width:100%; max-height:100%; object-fit:contain;
  border-radius:10px; box-shadow:0 10px 30px rgba(0,0,0,.5);
}

/* Ratio en el modal */
.modal-ratio{
  margin-top:8px; font-size:13px; font-weight:600; color:#00ff88; opacity:.95;
}

/* Responsive del modal */
@media (max-width:768px){
  .modal-content{ flex-direction:column; width:95%; height:95vh; margin:2.5% auto; padding:20px; gap:20px; }
  .modal-left{ flex:1; }
  .modal-right{ flex:none; max-height:40%; }
}

/* ====== TARJETAS DE VIDEOS (miniatura arriba) ====== */
.video-card{ padding:0; overflow:hidden; }
.video-card .video-thumb{
  width:100%; display:block; aspect-ratio:16/9; object-fit:cover;
  border-top-left-radius:16px; border-top-right-radius:16px;
}
.video-card .card-content{ padding:20px 20px 0 20px; }
.video-card .card-footer{ margin:15px 20px 20px; }

/* Pequeño glow en pestaña activa (mejor foco) */
.tab.active{ box-shadow: inset 0 -2px 0 #00ff88; }

/* Limitar altura de descripciones en cards (mejor grid) */
.card-description{
  display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical;
  overflow:hidden; text-overflow:ellipsis;
}

