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

:root {
    --primary-color: #25f4ee;
    --secondary-color: #fe2c55;
    --dark-bg: #0a0e27;
    --dark-bg-2: #111827;
    --text-light: #ffffff;
    --text-muted: #b0b0b0;
    --border-color: #2a3f5f;
}

html, body {
    width: 100%;
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--dark-bg);
    color: var(--text-light);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* HEADER */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
    background: linear-gradient(135deg, #0a0e27 0%, #1a1f3a 100%);
    padding: 0 20px;
    border-bottom: 1px solid var(--border-color);
    position: relative;
    z-index: 10;
}

.header-logo h1 {
    font-size: 24px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

.header-actions {
    display: flex;
    gap: 15px;
}

.btn-upload {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border: none;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    color: var(--dark-bg);
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-upload:active {
    transform: scale(0.95);
}

.btn-upload:hover {
    box-shadow: 0 0 20px rgba(37, 244, 238, 0.4);
}

/* NAVEGACIÓN DE MÓDULOS */
.module-nav {
    display: flex;
    height: 50px;
    background-color: var(--dark-bg-2);
    border-bottom: 1px solid var(--border-color);
    position: relative;
    z-index: 9;
}

.nav-btn {
    flex: 1;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: color 0.3s, border-bottom 0.3s;
    border-bottom: 3px solid transparent;
}

.nav-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.nav-btn i {
    font-size: 18px;
}

.scroll-container {
    flex: 1;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    position: relative;
    background-color: var(--dark-bg);
    display: none;
}

.scroll-container.active {
    display: block;
}

.scroll-container::-webkit-scrollbar {
    width: 4px;
}

.scroll-container::-webkit-scrollbar-track {
    background: transparent;
}

.scroll-container::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 2px;
}

.scroll-item {
    width: 100%;
    height: 100%;
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
    background-color: #000;
    position: relative;
    overflow: hidden;
}

.scroll-item video,
.scroll-item img {
    width: 100%;
    flex: 1;
    object-fit: contain;
    display: block;
}

.scroll-info {
    padding: 20px;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.3) 0%, rgb(106 78 125 / 85%) 100%);
    position: relative;
    color: var(--text-light);
    cursor: pointer;
    opacity: 1;
    transition: opacity 0.3s ease, transform 0.3s ease;
    transform: translateY(0);
    flex-shrink: 0;
}

.scroll-info.hidden {
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
}



.scroll-info-toggle {
    position: absolute;
    bottom: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    background: rgba(37, 244, 238, 0.2);
    border: 1px solid var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-light);
    font-size: 18px;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    transform: scale(0.8);
    pointer-events: none;
    z-index: 5;
}

@keyframes slideOutLeft {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(-100%);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideOutRight {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.scroll-container.slide-out {
    animation: slideOutLeft 0.4s ease-out forwards;
}

.scroll-container.slide-in {
    animation: slideInRight 0.4s ease-out forwards;
}

.gallery-container.slide-out {
    animation: slideOutRight 0.4s ease-out forwards;
}

.gallery-container.slide-in {
    animation: slideInLeft 0.4s ease-out forwards;
}

.scroll-info.hidden ~ .scroll-info-toggle {
    opacity: 1;
    pointer-events: auto;
    transform: scale(1);
}

.scroll-info h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    line-height: 1.3;
}

.scroll-info p {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.4;
}

/* GALERÍA */
.gallery-container {
    flex: 1;
    width: 100%;
    overflow-y: auto;
    padding: 0;
    display: none;
    flex-wrap: wrap;
    align-content: flex-start;
    gap: 0;
}

.gallery-container.active {
    display: flex;
}

.gallery-container::-webkit-scrollbar {
    width: 4px;
}

.gallery-container::-webkit-scrollbar-track {
    background: transparent;
}

.gallery-container::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 2px;
}

.gallery-item {
    aspect-ratio: 1;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    position: relative;
    background-color: var(--dark-bg-2);
    transition: transform 0.3s;
    margin: 0;
    width: 50%;
    flex-shrink: 0;
}

.gallery-item:active {
    transform: scale(0.95);
}

.gallery-item img,
.gallery-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-info {
    padding: 10px;
    background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.8) 100%);
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
}

.gallery-info h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-light);
}

/* MODAL DE SUBIDA */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    align-items: flex-end;
}

.modal {
    display: none;
}

.modal-content {
    width: 100%;
    background-color: var(--dark-bg-2);
    border-radius: 20px 20px 0 0;
    padding: 20px;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

.modal-content h2 {
    margin-bottom: 20px;
    font-size: 20px;
}

.close {
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: var(--text-light);
    margin-bottom: 10px;
}

#uploadForm {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

#uploadForm input,
#uploadForm textarea,
#uploadForm select {
    padding: 12px;
    background-color: var(--dark-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-light);
    font-family: inherit;
    font-size: 14px;
}

#uploadForm input::placeholder,
#uploadForm textarea::placeholder {
    color: var(--text-muted);
}

#uploadForm input:focus,
#uploadForm textarea:focus,
#uploadForm select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 244, 238, 0.1);
}

.btn-primary {
    padding: 14px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border: none;
    border-radius: 8px;
    color: var(--dark-bg);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s;
    margin-top: 10px;
}

.btn-primary:active {
    transform: scale(0.98);
}

/* RESPONSIVE */
@media (max-width: 480px) {
    .header {
        height: 50px;
        padding: 0 15px;
    }

    .header-logo h1 {
        font-size: 20px;
    }

    .btn-upload {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }

    .gallery-container {
        grid-template-columns: repeat(2, 1fr);
        /* gap: 8px; */
    }

    .modal-content {
        padding: 15px;
    }
}
