/* css/style.css */

/* Intro Terminal Overlay */
#intro-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #0a0a0a;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

#intro-overlay.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.terminal {
    width: 90%;
    max-width: 700px;
    max-height: 90vh;
    background: #1a1a1a;
    border: 2px solid #333;
    border-radius: 8px;
    box-shadow: 0 0 40px rgba(209, 35, 35, 0.3);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.terminal-header {
    background: #2a2a2a;
    padding: 0.75rem 1rem;
    display: flex;
    gap: 0.5rem;
}

.terminal-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #d12323;
}

.terminal-dot:nth-child(2) {
    background: #f5a623;
}

.terminal-dot:nth-child(3) {
    background: #7ed321;
}

.terminal-body {
    padding: 1.5rem;
    min-height: 200px;
    flex: 1;
    overflow-y: auto;
    font-family: 'Cutive Mono', monospace;
    font-size: 1rem;
    line-height: 1.8;
    color: #d12323;
}

#terminal-text {
    margin: 0;
    white-space: pre-wrap;
}

#terminal-cursor {
    animation: blink 0.7s infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

#terminal-menu {
    padding: 1rem 1.5rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

#terminal-menu.hidden {
    display: none;
}

.menu-option {
    display: block;
    width: 100%;
    padding: 0.6rem 1rem;
    background: transparent;
    border: 1px solid #444;
    color: #d12323;
    font-family: 'Cutive Mono', monospace;
    font-size: 0.9rem;
    cursor: pointer;
    text-align: left;
    transition: all 0.2s;
}

.menu-option:hover,
.menu-option:focus {
    background: #d12323;
    color: #0a0a0a;
    border-color: #d12323;
}

.menu-option .key {
    color: #7ed321;
    font-weight: bold;
    margin-right: 0.5rem;
}

.menu-option:hover .key,
.menu-option:focus .key {
    color: #0a0a0a;
}

:root {
    --background-color: #f4f1ea; /* Un blanco roto, como papel antiguo */
    --text-color: #1a1a1a;
    --accent-color: #d12323; /* Un rojo fuerte para acentos */
    --border-color: #333;
    --font-serif: 'Libre Baskerville', serif;
    --font-mono: 'Cutive Mono', monospace;
}

* {
    box-sizing: border-box;
}

body {
    background-color: var(--background-color);
    color: var(--text-color);
    font-family: var(--font-serif);
    line-height: 1.7;
    margin: 0;
    padding: 1rem;
    padding-top: 1rem;
    padding-bottom: 120px;
}

header {
    text-align: center;
    font-family: var(--font-mono);
    text-transform: uppercase;
    max-width: 900px;
    margin: 0 auto;
}

header h1 {
    font-size: clamp(1.5rem, 5vw, 3rem);
    color: var(--accent-color);
    margin: 0;
    font-weight: 700;
}

header .subtitle {
    font-size: 1rem;
    margin-top: 0.5rem;
}

#conversation-container {
    max-width: 900px;
    margin: 2rem auto;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    padding-top: 1rem;
}

.message {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    scroll-margin-top: 1rem;
}

.avatar {
    width: 60px;
    height: 60px;
    min-width: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    font-family: var(--font-mono);
    color: var(--accent-color);
    background-color: #ddd;
    border: 2px solid var(--border-color);
    border-radius: 50%;
    overflow: hidden;
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.message-content {
    flex: 1;
    min-width: 0;
    border: 2px solid var(--border-color);
    padding: 1rem 1.25rem;
    background-color: white;
    box-shadow: 3px 3px 0px var(--border-color);
}

.author {
    display: block;
    margin-bottom: 0.25rem;
    font-family: var(--font-mono);
    font-size: 1rem;
    color: var(--accent-color);
}

.meta-info {
    display: block;
    margin-bottom: 0.5rem;
    font-style: italic;
    font-size: 0.85rem;
    color: #666;
}

.meta-info:empty {
    display: none;
}

.text {
    margin: 0;
    white-space: pre-wrap;
    word-wrap: break-word;
    font-size: 1rem;
}

/* Estilos específicos para diferenciar personajes */
.message[data-character="jose-luis"] .message-content {
    border-style: solid;
}

.message[data-character="chatgpt4"] .message-content {
    border-style: dashed;
}

.message[data-character="hugo-ball"] .message-content {
    border-style: dotted;
}

.message[data-character="tristan-tzara"] .message-content {
    border-style: double;
    border-width: 4px;
}

.message[data-character="richard-huelsenbeck"] .message-content {
    border-style: groove;
    border-width: 4px;
}

/* Estados de navegación */
.message {
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.message.past {
    opacity: 0.25;
}

.message.future {
    opacity: 0.15;
}

.message.active {
    opacity: 1;
    transform: scale(1.01);
}

/* Footer */
#main-footer {
    text-align: center;
    max-width: 900px;
    margin: 3rem auto 2rem;
    padding: 2rem 1rem;
    font-family: var(--font-mono);
    transition: opacity 0.4s ease;
}

#main-footer.hidden {
    opacity: 0;
    pointer-events: none;
}

.end-transmission {
    font-size: 1.2rem;
    text-transform: uppercase;
    color: var(--accent-color);
    margin-bottom: 1.5rem;
}

.credits {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    text-transform: none;
}

.credits a {
    color: var(--text-color);
    text-decoration: underline;
}

.credits a:hover {
    color: var(--accent-color);
}

.support {
    margin-top: 1rem;
}

.support a {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--accent-color);
    color: white;
    text-decoration: none;
    border: 2px solid var(--border-color);
    box-shadow: 2px 2px 0 var(--border-color);
    transition: all 0.2s;
    text-transform: none;
}

.support a:hover {
    transform: translate(-2px, -2px);
    box-shadow: 4px 4px 0 var(--border-color);
}

/* Controles de navegación */
.nav-controls {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--background-color);
    border: 2px solid var(--border-color);
    padding: 0.75rem 1.5rem;
    box-shadow: 4px 4px 0 var(--border-color);
    z-index: 100;
}

.nav-btn {
    background: white;
    border: 2px solid var(--border-color);
    font-size: 1.5rem;
    width: 50px;
    height: 50px;
    cursor: pointer;
    font-family: var(--font-mono);
    transition: all 0.2s;
}

.nav-btn:hover:not(:disabled) {
    background: var(--accent-color);
    color: white;
}

.nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.nav-counter {
    font-family: var(--font-mono);
    font-size: 1rem;
    min-width: 80px;
    text-align: center;
}

/* Responsive */
@media (max-width: 600px) {
    body {
        padding: 0.5rem;
        padding-bottom: 100px;
    }

    .message {
        flex-direction: column;
        align-items: center;
        text-align: center;
        scroll-margin-top: 0.5rem;
    }

    .avatar {
        width: 50px;
        height: 50px;
        min-width: 50px;
    }

    .message-content {
        width: 100%;
    }

    .text {
        text-align: left;
    }

    .meta-info {
        text-align: left;
    }

    .nav-controls {
        bottom: 1rem;
        padding: 0.5rem 1rem;
    }

    .nav-btn {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }

    #main-footer {
        padding: 1.5rem 0.5rem;
    }

    .gallery {
        flex-direction: column;
    }

    .gallery-item {
        width: 100%;
    }
}

/* Galería de propuestas */
.gallery {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.gallery-item {
    width: calc(33.333% - 0.75rem);
    min-width: 150px;
    cursor: pointer;
    border: 2px solid var(--border-color);
    background: white;
    padding: 0.5rem;
    box-shadow: 3px 3px 0 var(--border-color);
    transition: all 0.2s;
}

.gallery-item:hover {
    transform: translate(-2px, -2px);
    box-shadow: 5px 5px 0 var(--border-color);
}

.gallery-item img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    display: block;
}

.gallery-item .gallery-caption {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    padding: 0.5rem 0 0;
    text-align: center;
    color: var(--text-color);
}

.gallery-item .gallery-author {
    font-size: 0.65rem;
    color: #666;
    font-style: italic;
}

/* Lightbox */
#lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

#lightbox.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

#lightbox-close {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    background: none;
    border: none;
    color: white;
    font-size: 3rem;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}

#lightbox-close:hover {
    color: var(--accent-color);
}

.lightbox-content {
    max-width: 90%;
    max-height: 90%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#lightbox-img {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
    border: 4px solid white;
    box-shadow: 0 0 40px rgba(209, 35, 35, 0.5);
}

.lightbox-info {
    text-align: center;
    color: white;
    margin-top: 1.5rem;
    font-family: var(--font-mono);
}

#lightbox-title {
    font-size: 1.2rem;
    margin: 0 0 0.5rem;
    color: var(--accent-color);
}

#lightbox-author {
    font-size: 0.9rem;
    margin: 0;
    font-style: italic;
    color: #ccc;
}
