/* PROJECT ELIA - MONOKURO Style */

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

:root {
    --primary-bg: #000000;
    --primary-text: #ffffff;
    --border-color: #ffffff;
    --gray-text: #383838;
    --border-width: 2.75px;
}

@font-face {
    font-family: 'PressStart2P';
    src: url('fonts/87db808ef44056be-s_p.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'PressStartAlt';
    src: url('fonts/f8c7d4a04eee4eea-s_p.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

body {
    font-family: 'PressStart2P', 'Courier New', 'Courier', monospace;
    background-color: var(--primary-bg);
    color: var(--primary-text);
    line-height: 1.6;
    overflow: hidden;
    width: 100vw;
    height: 100vh;
}

.container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

/* PROJECT ELIA - MONOKURO Style */

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

:root {
    --primary-bg: #000000;
    --primary-text: #ffffff;
    --border-color: #ffffff;
    --gray-text: #383838;
    --border-width: 2.75px;
}

@font-face {
    font-family: 'PressStart2P';
    src: url('fonts/87db808ef44056be-s_p.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'PressStartAlt';
    src: url('fonts/f8c7d4a04eee4eea-s_p.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

body {
    font-family: 'PressStart2P', 'Courier New', 'Courier', monospace;
    background-color: var(--primary-bg);
    color: var(--primary-text);
    line-height: 1.6;
    overflow: hidden;
    width: 100vw;
    height: 100vh;
}

.container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.window {
    width: 100%;
    max-width: 1210px;
    max-height: 95vh;
    height: 95vh;
    display: flex;
    flex-direction: column;
    border: var(--border-width) solid var(--border-color);
}

/* Window Header */
.window-header {
    position: relative;
    height: 34px;
    border-bottom: var(--border-width) solid var(--border-color);
    background: var(--primary-bg);
}

.window-lines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 4px 2px;
}

.window-lines::before,
.window-lines::after {
    content: '';
    width: 100%;
    height: 1px;
    background: var(--border-color);
}

.window-title {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    padding: 0 1rem;
}

.close-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border: 1px solid var(--border-color);
    background: var(--primary-bg);
    color: var(--primary-text);
    text-decoration: none;
    font-size: 8.8px;
    margin-left: 1rem;
    z-index: 10;
    transition: color 0.2s;
}

.page-content {
    width: 100%;
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 1.5rem;
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.narrative-text {
    max-width: 800px;
    width: 100%;
    line-height: 1.8;
    font-size: 14px;
    padding-bottom: 2rem;
}

@media (max-width: 1024px) {
    .narrative-text {
        font-size: 12px;
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .narrative-text {
        font-size: 11px;
        line-height: 1.6;
    }
    
    .page-content {
        padding: 1rem;
    }
}

.narrative-text h1 {
    font-size: 16px;
    margin-bottom: 2rem;
    color: var(--primary-text);
    letter-spacing: 2px;
}

@media (max-width: 768px) {
    .narrative-text h1 {
        font-size: 12px;
        margin-bottom: 1rem;
    }
}

.narrative-text p {
    margin-bottom: 0.75rem;
    color: var(--primary-text);
}

.spacer {
    height: 2rem;
}

@media (max-width: 768px) {
    .spacer {
        height: 1rem;
    }
}

/* Navigation buttons */
.navigation-buttons {
    display: flex;
    gap: 2rem;
    margin-top: 3rem;
    justify-content: center;
}

@media (max-width: 768px) {
    .navigation-buttons {
        flex-direction: column;
        gap: 1rem;
        margin-top: 2rem;
    }
}

.nav-button {
    color: var(--primary-text);
    text-decoration: none;
    padding: 0.75rem 2rem;
    border: var(--border-width) solid var(--border-color);
    transition: all 0.2s;
    display: inline-block;
    text-align: center;
}

.nav-button:hover,
.nav-button:focus {
    background: var(--primary-text);
    color: var(--primary-bg);
    outline: none;
}

/* File browser styles */
.file-browser {
    width: 100%;
    max-width: 900px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding-bottom: 2rem;
}

.file-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    border: var(--border-width) solid var(--border-color);
}

.file-item {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background 0.2s;
}

.file-item:last-child {
    border-bottom: none;
}

.file-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.file-item a {
    color: var(--primary-text);
    text-decoration: none;
    flex: 1;
}

.file-item a:hover {
    text-decoration: underline;
}

.file-icon {
    margin-right: 1rem;
    font-size: 16px;
}

.file-size {
    color: var(--gray-text);
    font-size: 10px;
    margin-left: 1rem;
}

/* Terminal styles */
.terminal-container {
    width: 100%;
    max-width: 900px;
    display: flex;
    flex-direction: column;
    height: 100%;
    max-height: calc(100vh - 300px);
}

.terminal-output {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    line-height: 1.5;
    border: var(--border-width) solid var(--border-color);
    margin-bottom: 1rem;
}

.terminal-line {
    margin-bottom: 0.5rem;
}

.terminal-prompt {
    color: #0f0;
}

.terminal-input-area {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.terminal-input-area span {
    color: #0f0;
}

.terminal-input {
    flex: 1;
    background: transparent;
    border: var(--border-width) solid var(--border-color);
    color: var(--primary-text);
    padding: 0.75rem;
    font-family: 'Courier New', monospace;
    font-size: 12px;
}

.terminal-input:focus {
    outline: none;
    border-color: #0f0;
}

/* Room/Gallery styles */
.room-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    width: 100%;
    max-width: 1000px;
    padding: 2rem;
}

@media (max-width: 768px) {
    .room-gallery {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 1rem;
    }
}

.room-item {
    border: var(--border-width) solid var(--border-color);
    padding: 1rem;
    transition: transform 0.2s;
}

.room-item:hover {
    transform: scale(1.02);
}

.room-item img {
    width: 100%;
    height: auto;
    display: block;
    margin-bottom: 1rem;
}

.room-item-title {
    font-size: 12px;
    text-align: center;
}

/* User profile styles */
.user-profile {
    max-width: 600px;
    width: 100%;
    padding-bottom: 2rem;
}

.profile-section {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.profile-section:last-child {
    border-bottom: none;
}

.profile-section h2 {
    font-size: 14px;
    margin-bottom: 1rem;
    color: #0f0;
}

.profile-field {
    display: flex;
    margin-bottom: 0.75rem;
    font-size: 12px;
}

.profile-label {
    min-width: 120px;
    color: var(--gray-text);
}

.profile-value {
    color: var(--primary-text);
}

/* Warning/System message styles */
.warning-container {
    max-width: 700px;
    width: 100%;
    text-align: center;
    padding-bottom: 2rem;
}

.warning-icon {
    font-size: 48px;
    margin-bottom: 2rem;
    color: #ff0;
}

.warning-title {
    font-size: 18px;
    margin-bottom: 1.5rem;
    letter-spacing: 2px;
}

.warning-message {
    font-size: 12px;
    line-height: 1.8;
    margin-bottom: 2rem;
}

.warning-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

@media (max-width: 768px) {
    .warning-actions {
        flex-direction: column;
    }
}

/* ASCII Art container */
.ascii-art {
    font-family: 'Courier New', monospace;
    font-size: 8px;
    line-height: 1;
    white-space: pre;
    text-align: center;
    margin: 2rem 
    }
/* Additional Responsive Fixes for 100% Zoom */
@media (max-width: 1400px) {
    .narrative-text {
        font-size: 13px;
    }
    
    .marketplace-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1.5rem;
    }
}

@media (max-width: 1200px) {
    .narrative-text {
        font-size: 12px;
    }
    
    .user-profile {
        max-width: 100%;
        padding: 0 1rem 2rem 1rem;
    }
    
    .warning-container {
        max-width: 100%;
        padding: 0 1rem 2rem 1rem;
    }
    
    .file-browser {
        max-width: 100%;
        padding: 0 0 2rem 0;
    }
}

/* Ensure all content containers are scrollable */
.content-area {
    overflow: hidden;
}

.page-content {
    box-sizing: border-box;
}

.narrative-text,
.user-profile,
.warning-container,
.file-browser,
.terminal-container {
    box-sizing: border-box;
}

/* Fix marketplace for responsiveness */
.marketplace-grid {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
}

.marketplace-item {
    box-sizing: border-box;
}

.close-btn:hover,
.close-btn:focus {
    color: #888;
    outline: none;
}

/* Content Area */
.content-area {
    position: relative;
    flex: 1;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.main-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    z-index: 1;
}

.menu-options {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 2rem;
    background: rgba(0, 0, 0, 0.8);
    border: var(--border-width) solid var(--border-color);
}

.menu-item {
    font-size: 12px;
}

.menu-item a {
    color: var(--primary-text);
    text-decoration: none;
    transition: all 0.2s;
    display: inline-block;
}

.menu-item a:hover,
.menu-item a:focus {
    text-decoration: underline;
    transform: translateX(4px);
    outline: none;
}

/* Text Area */
.text-area {
    min-height: 80px;
    max-height: 168px;
    border-top: var(--border-width) solid var(--border-color);
    padding: 1rem 2.5rem;
    font-size: 10px;
    display: flex;
    align-items: center;
    transition: max-height 0.2s;
}

@media (min-width: 1024px) {
    .text-area {
        font-size: 16px;
        min-height: 120px;
    }
}

.text-content {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

#typed-text {
    flex: 1;
    line-height: 1.54;
    white-space: pre-wrap;
}

.next-link {
    margin-left: auto;
}

.next-link a {
    color: var(--primary-text);
    text-decoration: none;
    white-space: nowrap;
    transition: text-decoration 0.2s;
}

.next-link a:hover,
.next-link a:focus {
    text-decoration: underline;
    outline: none;
}

/* Footer */
.footer {
    padding: 0.5rem 0;
    font-size: 6.08px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 1rem;
}

@media (min-width: 1024px) {
    .footer {
        font-size: 10.016px;
    }
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.625rem;
    align-items: center;
}

.heart {
    color: var(--primary-text);
}

.text-gray {
    color: var(--gray-text);
}

.footer a {
    color: var(--primary-text);
    text-decoration: underline;
    transition: opacity 0.2s;
}

.footer a:hover,
.footer a:focus {
    opacity: 0.7;
    outline: none;
}

/* Typing cursor */
.cursor {
    display: inline-block;
    width: 8px;
    height: 16px;
    background: var(--primary-text);
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--primary-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border: 1px solid var(--primary-bg);
}

::-webkit-scrollbar-thumb:hover {
    background: #888;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .container {
        padding: 0.375rem;
    }
    
    .window-header {
        height: 24px;
    }
    
    .text-area {
        padding: 0.5rem 1rem;
        font-size: 8px;
    }
    
    .menu-options {
        padding: 1rem;
        gap: 0.5rem;
    }
    
    .menu-item {
        font-size: 10px;
    }
}


/* Loading state */
.loading {
    opacity: 0.5;
    pointer-events: none;
}

/* Enhanced Mobile and Tablet Responsiveness */
@media (max-width: 1024px) {
    .window {
        max-height: 96vh;
        height: 96vh;
    }
    
    .container {
        padding: 0.5rem;
    }
}

@media (max-width: 768px) {
    .window {
        max-width: 100%;
        max-height: 98vh;
        height: 98vh;
        border-width: 2px;
    }
    
    .container {
        padding: 0.25rem;
    }
    
    .window-header {
        height: 2rem;
    }
    
    .text-area {
        min-height: 4rem;
        max-height: 8rem;
        padding: 0.5rem 1rem;
        font-size: 0.5rem;
    }
    
    .footer {
        font-size: 0.35rem;
        padding: 0.25rem 0;
    }
}

/* Ensure content always fits */
* {
    box-sizing: border-box;
}



.content-area {
    min-height: 0;
    flex: 1;
}

.window {
    width: 100%;
    max-width: 1210px;
    max-height: 95vh;
    height: 95vh;
    display: flex;
    flex-direction: column;
    border: var(--border-width) solid var(--border-color);
}

/* Window Header */
.window-header {
    position: relative;
    height: 34px;
    border-bottom: var(--border-width) solid var(--border-color);
    background: var(--primary-bg);
}

.page-content {
    padding: 1.5rem;
    align-items: flex-start;
    overflow-x: hidden;
}

.window-lines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 4px 2px;
}

.window-lines::before,
.window-lines::after {
    content: '';
    width: 100%;
    height: 1px;
    background: var(--border-color);
}

.window-title {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    padding: 0 1rem;
}

.close-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border: 1px solid var(--border-color);
    background: var(--primary-bg);
    color: var(--primary-text);
    text-decoration: none;
    font-size: 8.8px;
    margin-left: 1rem;
    z-index: 10;
    transition: color 0.2s;
}

.close-btn:hover,
.close-btn:focus {
    color: #888;
    outline: none;
}

/* Content Area */
.content-area {
    position: relative;
    flex: 1;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.main-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    z-index: 1;
}

.menu-options {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 2rem;
    background: rgba(0, 0, 0, 0.8);
    border: var(--border-width) solid var(--border-color);
}

.menu-item {
    font-size: 12px;
}

.menu-item a {
    color: var(--primary-text);
    text-decoration: none;
    transition: all 0.2s;
    display: inline-block;
}

.menu-item a:hover,
.menu-item a:focus {
    text-decoration: underline;
    transform: translateX(4px);
    outline: none;
}

/* Text Area */
.text-area {
    min-height: 80px;
    max-height: 168px;
    border-top: var(--border-width) solid var(--border-color);
    padding: 1rem 2.5rem;
    font-size: 10px;
    display: flex;
    align-items: center;
    transition: max-height 0.2s;
}

@media (min-width: 1024px) {
    .text-area {
        font-size: 16px;
        min-height: 120px;
    }
}

.text-content {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

#typed-text {
    flex: 1;
    line-height: 1.54;
    white-space: pre-wrap;
}

.next-link {
    margin-left: auto;
}

.next-link a {
    color: var(--primary-text);
    text-decoration: none;
    white-space: nowrap;
    transition: text-decoration 0.2s;
}

.next-link a:hover,
.next-link a:focus {
    text-decoration: underline;
    outline: none;
}

/* Footer */
.footer {
    padding: 0.5rem 0;
    font-size: 6.08px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 1rem;
}

@media (min-width: 1024px) {
    .footer {
        font-size: 10.016px;
    }
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.625rem;
    align-items: center;
}

.heart {
    color: var(--primary-text);
}

.text-gray {
    color: var(--gray-text);
}

.footer a {
    color: var(--primary-text);
    text-decoration: underline;
    transition: opacity 0.2s;
}

.footer a:hover,
.footer a:focus {
    opacity: 0.7;
    outline: none;
}

/* Typing cursor */
.cursor {
    display: inline-block;
    width: 8px;
    height: 16px;
    background: var(--primary-text);
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--primary-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border: 1px solid var(--primary-bg);
}

::-webkit-scrollbar-thumb:hover {
    background: #888;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .container {
        padding: 0.375rem;
    }
    
    .window-header {
        height: 24px;
    }
    
    .text-area {
        padding: 0.5rem 1rem;
        font-size: 8px;
    }
    
    .menu-options {
        padding: 1rem;
        gap: 0.5rem;
    }
    
    .menu-item {
        font-size: 10px;
    }
}

/* Loading state */
.loading {
    opacity: 0.5;
    pointer-events: none;
}
