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

body {
    font-family: 'Courier New', monospace;
    background-color: #000000;
    color: #ffffff;
    line-height: 1.2;
    overflow-x: hidden;
    height: 100vh;
}

.terminal {
    height: 100vh;
    background-color: #000000;
    border: none;
    display: flex;
    flex-direction: column;
}

.terminal-header {
    background-color: #000000;
    color: #ffffff;
    padding: 8px 16px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    font-weight: bold;
    border-bottom: 1px solid #ffffff;
    font-size: 14px;
}

.header-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
}

.social-links {
    display: flex;
    gap: 8px;
}

.social-link {
    color: #ffffff;
    text-decoration: none;
    border: 1px solid #ffffff;
    padding: 3px 8px;
    font-size: 11px;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    background-color: transparent;
}

.social-link:hover {
    background-color: #ffffff;
    color: #000000;
    transform: translateY(-1px);
}

.social-link:active {
    transform: translateY(0);
}

.icon-text {
    display: block;
    line-height: 1;
}

.terminal-content {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    height: calc(100vh - 60px);
}

.main-layout {
    display: flex;
    flex-direction: column;
    height: 100%;
    gap: 20px;
}

.ascii-title {
    color: #ffffff;
    text-align: center;
    margin-bottom: 30px;
    font-size: 11px;
    white-space: pre;
    animation: titleGlow 3s ease-in-out infinite alternate;
}

@keyframes titleGlow {
    from {
        text-shadow: 0 0 5px #ffffff;
        opacity: 0.8;
    }
    to {
        text-shadow: 0 0 20px #ffffff, 0 0 30px #ffffff;
        opacity: 1;
    }
}

.stream-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 300px;
    max-height: 40vh;
}

.text-stream {
    flex: 1;
    background-color: #000000;
    border: 1px solid #ffffff;
    padding: 15px;
    overflow-y: auto;
    font-size: 13px;
    line-height: 1.4;
    scrollbar-width: thin;
    scrollbar-color: #ffffff #000000;
}

.text-stream::-webkit-scrollbar {
    width: 8px;
}

.text-stream::-webkit-scrollbar-track {
    background: #000000;
}

.text-stream::-webkit-scrollbar-thumb {
    background: #ffffff;
    border-radius: 4px;
}

.stream-line {
    margin-bottom: 8px;
    animation: fadeInStream 0.5s ease-out;
    color: #ffffff;
}

.stream-line.system {
    color: #cccccc;
}

.stream-line.error {
    color: #666666;
    font-weight: bold;
}

.stream-line.mystical {
    color: #ffffff;
    font-style: italic;
}

.stream-line.philosophical {
    color: #aaaaaa;
}

.stream-line.consciousness {
    color: #ffffff;
    font-weight: bold;
}

@keyframes fadeInStream {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.input-line {
    display: flex;
    align-items: center;
    margin-top: 10px;
    background-color: #000000;
    border: 1px solid #ffffff;
    padding: 10px;
    flex-shrink: 0;
}

.prompt {
    color: #ffffff;
    margin-right: 10px;
    font-weight: bold;
}

.command-input {
    flex: 1;
    background-color: transparent;
    border: none;
    color: #ffffff;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    outline: none;
}

.command-input::placeholder {
    color: #666666;
    font-style: italic;
}

.gallery-section {
    border: 1px solid #ffffff;
    padding: 20px;
    flex: 0 0 auto;
    order: -1;
}

.gallery-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    color: #ffffff;
    font-weight: bold;
}

.gallery-title {
    font-size: 16px;
    letter-spacing: 2px;
}

.gallery-count {
    font-size: 12px;
    color: #666666;
}

.image-gallery {
    position: relative;
    height: 400px;
    border: 1px solid #ffffff;
    background-color: #000000;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 15px;
}

.gallery-slide {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.gallery-slide.active {
    opacity: 1;
}

.gallery-slide img {
    max-width: 95%;
    max-height: 95%;
    object-fit: contain;
    filter: grayscale(100%) contrast(1.2) brightness(0.9);
    transition: filter 0.3s ease, transform 0.3s ease;
}

.gallery-slide:hover img {
    filter: grayscale(100%) contrast(1.3) brightness(1.1);
    transform: scale(1.02);
}

.slideshow-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.7);
    border: 1px solid #ffffff;
    color: #ffffff;
    width: 40px;
    height: 60px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Courier New', monospace;
    font-size: 18px;
    font-weight: bold;
    transition: all 0.3s ease;
    z-index: 10;
    user-select: none;
}

.slideshow-nav:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-50%) scale(1.05);
}

.slideshow-nav:active {
    transform: translateY(-50%) scale(0.95);
}

.slideshow-nav.prev {
    left: 15px;
}

.slideshow-nav.next {
    right: 15px;
}

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

.slideshow-nav.disabled:hover {
    background-color: rgba(0, 0, 0, 0.7);
    transform: translateY(-50%) scale(1);
}

.slide-info {
    position: absolute;
    top: 15px;
    left: 15px;
    color: #ffffff;
    font-size: 12px;
    background-color: rgba(0, 0, 0, 0.8);
    padding: 6px 12px;
    border: 1px solid #ffffff;
    letter-spacing: 1px;
}


.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 90vw;
    max-height: 90vh;
    border: 2px solid #ffffff;
}

.modal img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: grayscale(100%) contrast(1.2);
}

.close-modal {
    position: absolute;
    top: -30px;
    right: 0;
    color: #ffffff;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    background: #000000;
    padding: 5px 10px;
    border: 1px solid #ffffff;
}

.close-modal:hover {
    background: #ffffff;
    color: #000000;
}

.cursor-blink {
    animation: blink 1s infinite;
}

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

.glitch-effect {
    animation: textGlitch 0.1s ease-in-out;
}

@keyframes textGlitch {
    0% {
        transform: translate(0);
        filter: hue-rotate(0deg);
    }
    20% {
        transform: translate(-1px, 1px);
        filter: hue-rotate(90deg);
    }
    40% {
        transform: translate(-1px, -1px);
        filter: hue-rotate(180deg);
    }
    60% {
        transform: translate(1px, 1px);
        filter: hue-rotate(270deg);
    }
    80% {
        transform: translate(1px, -1px);
        filter: hue-rotate(360deg);
    }
    100% {
        transform: translate(0);
        filter: hue-rotate(0deg);
    }
}

/* Mobile Responsiveness */
@media (max-width: 1024px) {
    .main-layout {
        flex-direction: column;
    }

    .image-gallery {
        height: 350px;
    }

    .stream-container {
        max-height: 35vh;
        min-height: 250px;
    }
}

@media (max-width: 768px) {
    .terminal-header {
        padding: 6px 12px;
        font-size: 12px;
    }

    .social-links {
        gap: 6px;
    }

    .social-link {
        padding: 2px 6px;
        font-size: 10px;
    }

    .terminal-content {
        padding: 15px;
    }

    .ascii-title {
        font-size: 8px;
        margin-bottom: 20px;
    }

    .image-gallery {
        height: 300px;
    }

    .stream-container {
        min-height: 200px;
        max-height: 30vh;
    }

    .text-stream {
        font-size: 12px;
        padding: 12px;
    }

    .gallery-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }

    .gallery-title {
        font-size: 14px;
    }

    .gallery-count {
        font-size: 11px;
    }

    .slide-info {
        font-size: 10px;
        padding: 4px 8px;
        top: 10px;
        left: 10px;
    }

    .slideshow-nav {
        width: 35px;
        height: 50px;
        font-size: 16px;
    }

    .slideshow-nav.prev {
        left: 10px;
    }

    .slideshow-nav.next {
        right: 10px;
    }
}

@media (max-width: 480px) {
    .terminal-header {
        padding: 5px 10px;
        font-size: 11px;
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .header-right {
        width: 100%;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    .social-links {
        gap: 4px;
    }

    .social-link {
        padding: 2px 4px;
        font-size: 9px;
        letter-spacing: 0.5px;
    }

    .terminal-content {
        padding: 10px;
    }

    .ascii-title {
        font-size: 6px;
        margin-bottom: 15px;
    }

    .image-gallery {
        height: 250px;
    }

    .stream-container {
        min-height: 180px;
        max-height: 25vh;
    }

    .input-line {
        flex-direction: column;
        align-items: flex-start;
        padding: 8px;
    }

    .prompt {
        margin-bottom: 5px;
        margin-right: 0;
        font-size: 12px;
    }

    .command-input {
        width: 100%;
        font-size: 12px;
    }

    .text-stream {
        font-size: 11px;
        padding: 10px;
    }

    .gallery-title {
        font-size: 12px;
        letter-spacing: 1px;
    }

    .gallery-count {
        font-size: 10px;
    }

    .gallery-section {
        padding: 15px;
    }

    .slide-info {
        font-size: 9px;
        padding: 3px 6px;
        top: 8px;
        left: 8px;
        letter-spacing: 0.5px;
    }

    .slideshow-nav {
        width: 30px;
        height: 45px;
        font-size: 14px;
    }

    .slideshow-nav.prev {
        left: 8px;
    }

    .slideshow-nav.next {
        right: 8px;
    }
}

@media (max-width: 320px) {
    .terminal-content {
        padding: 8px;
    }

    .ascii-title {
        font-size: 5px;
    }

    .image-gallery {
        height: 200px;
    }

    .stream-container {
        min-height: 150px;
        max-height: 20vh;
    }

    .gallery-section {
        padding: 10px;
    }

    .slide-info {
        font-size: 8px;
        padding: 2px 4px;
    }
}