/* CSS Custom Properties for Dynamic Viewport */
:root {
    --app-height: 100vh;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    background: #0a0a0a;
    color: #00ff00;
    overflow: hidden;
    height: var(--app-height);
}

/* Modern viewport units with fallback */
@supports (height: 100dvh) {
    body {
        height: 100dvh;
    }
}

/* Login Screen Styles */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: var(--app-height);
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
}

/* Modern viewport units with fallback for login container */
@supports (height: 100dvh) {
    .login-container {
        height: 100dvh;
    }
}

.login-box {
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid #00ff00;
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.3);
    min-width: 400px;
}

.login-box h1 {
    color: #00ff00;
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
    text-shadow: 0 0 10px rgba(0, 255, 0, 0.5);
}

.credentials-info {
    background: rgba(0, 255, 0, 0.1);
    border: 1px solid #00ff00;
    border-radius: 4px;
    padding: 1rem;
    margin: 1.5rem 0;
}

.credentials-info h3 {
    color: #00ff00;
    margin-bottom: 0.5rem;
}

.credentials-info p {
    margin: 0.5rem 0;
    color: #cccccc;
}

.credential {
    color: #00ff00;
    font-weight: bold;
    background: rgba(0, 255, 0, 0.1);
    padding: 2px 6px;
    border-radius: 3px;
}

.login-button {
    background: #00ff00;
    color: #000;
    border: none;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-family: inherit;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
    margin-top: 1rem;
}

.login-button:hover {
    background: #00cc00;
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.5);
    transform: translateY(-2px);
}

/* Welcome Display Styles */
.welcome-container {
    height: var(--app-height);
    background: #000;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    border: 2px solid #00ff00;
    box-shadow: 0 0 30px rgba(0, 255, 0, 0.3);
}

/* Modern viewport units with fallback for welcome container */
@supports (height: 100dvh) {
    .welcome-container {
        height: 100dvh;
    }
}

.welcome-display {
    flex: 1;
    background: #000;
    color: #00ff00;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    padding: 1rem;
    overflow: hidden;
    white-space: pre;
    font-size: clamp(0.7rem, 3.5vmin, 1.8rem);
    line-height: 1.2;
    border-bottom: 1px solid #00ff00;
    display: flex;
    align-items: center;
    justify-content: center;
}

.terminal-prompt-area {
    height: 120px;
    min-height: 120px;
    background: #000;
    display: flex;
    flex-direction: column;
    border-top: 1px solid #00ff00;
}

.terminal-header {
    background: #1a1a1a;
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #333;
}


.terminal-controls {
    display: flex;
    gap: 0.5rem;
    margin-right: 1rem;
}

.control-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.control-dot.red {
    background: #ff5f56;
}

.control-dot.yellow {
    background: #ffbd2e;
}

.control-dot.green {
    background: #27ca3f;
}

.terminal-title {
    color: #888;
    font-size: 0.9rem;
}

.terminal-body {
    flex: 1;
    padding: 1rem;
    background: #000;
    overflow: hidden;
}

/* Utility Classes */
.hidden {
    display: none !important;
}


/* Terminal Expansion Animation */
.terminal-container.expanding {
    animation: expandTerminal 1s ease-in-out forwards;
}

@keyframes expandTerminal {
    from {
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 600px;
        height: 400px;
        border-radius: 8px;
    }
    to {
        position: fixed;
        top: 5%;
        left: 5%;
        transform: none;
        width: 90vw;
        height: 90vh;
        border-radius: 8px;
        border: 2px solid #00ff00;
        box-shadow: 0 0 30px rgba(0, 255, 0, 0.3);
    }
}

/* ASCII Art Scaling */
.ascii-art {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    white-space: pre;
    overflow-x: auto;
    font-size: clamp(0.3rem, 2.5vw, 0.8rem);
    line-height: 1.2;
}

/* High-DPI Display Support */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .welcome-display {
        font-size: clamp(0.8rem, 3vmin, 1.4rem);
        line-height: 1.4;
    }
}

/* Desktop Display Optimizations */
@media (min-width: 1024px) {
    .welcome-display {
        font-size: clamp(1rem, 4vmin, 2.2rem);
        line-height: 1.1;
        padding: 2rem;
    }
}

/* Large Desktop Displays */
@media (min-width: 1440px) {
    .welcome-display {
        font-size: clamp(1.2rem, 4.5vmin, 2.8rem);
        line-height: 1.05;
        padding: 3rem;
    }
}

/* Ultra-wide and 4K Displays */
@media (min-width: 2560px) {
    .welcome-display {
        font-size: clamp(1.5rem, 5vmin, 3.5rem);
        line-height: 1;
        padding: 4rem;
    }
}

/* High-DPI Display Support */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .welcome-display {
        font-size: clamp(0.8rem, 3.8vmin, 2rem);
        line-height: 1.3;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .login-box {
        min-width: 90%;
        padding: 1.5rem;
    }
    
    .welcome-display {
        font-size: clamp(0.6rem, 2.5vmin, 0.9rem);
        padding: 0.6rem;
        line-height: 1.4;
    }
    
    .terminal-prompt-area {
        height: 100px;
        min-height: 100px;
    }
    
    .ascii-art {
        font-size: clamp(0.6rem, 2.5vmin, 0.9rem);
    }
}

@media (max-width: 480px) {
    .welcome-display {
        font-size: clamp(0.65rem, 2.8vmin, 1rem);
        padding: 0.4rem;
        line-height: 1.5;
    }
    
    .terminal-prompt-area {
        height: 90px;
        min-height: 90px;
    }
    
    .ascii-art {
        font-size: clamp(0.65rem, 2.8vmin, 1rem);
    }
}

/* Facebook Browser Compatibility */
.facebook-browser {
    height: var(--app-height) !important;
    min-height: var(--app-height) !important;
    overflow: hidden;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
}

/* Modern viewport units with fallback for Facebook browser */
@supports (height: 100dvh) {
    .facebook-browser {
        height: 100dvh !important;
        min-height: 100dvh !important;
    }
}

.facebook-browser .welcome-container {
    height: var(--app-height) !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    border: none !important;
    border-radius: 0 !important;
}

/* Modern viewport units with fallback for Facebook welcome container */
@supports (height: 100dvh) {
    .facebook-browser .welcome-container {
        height: 100dvh !important;
    }
}

.facebook-browser .welcome-display {
    font-size: clamp(0.55rem, 2.3vmin, 0.85rem);
    letter-spacing: 0.5px;
    padding: 0.5rem;
    line-height: 1.4;
}

.facebook-browser .terminal-prompt-area {
    height: 80px !important;
    min-height: 80px !important;
}

.facebook-browser .login-box {
    min-width: 95%;
    max-width: 95%;
    padding: 1rem;
}

.facebook-browser .login-container {
    height: var(--app-height) !important;
}

/* Modern viewport units for Facebook login container */
@supports (height: 100dvh) {
    .facebook-browser .login-container {
        height: 100dvh !important;
    }
}

/* Facebook browser terminal adjustments */
.facebook-browser .terminal-body {
    padding: 0.5rem;
    font-size: 12px;
    line-height: 1.2;
    background: #000 !important;
}



.facebook-browser .ascii-art {
    font-size: clamp(0.2rem, 1.8vw, 0.7rem);
    letter-spacing: 0.5px;
}


/* Improve font rendering in Facebook browser */
.facebook-browser .xterm-screen {
    font-variant-ligatures: none;
    font-feature-settings: "liga" 0;
}

/* Additional mobile optimizations for Facebook */
@media screen and (max-width: 768px) {
    .facebook-browser .terminal-container.small {
        width: 98vw !important;
        height: 85vh !important;
        top: 7.5vh !important;
        left: 1vw !important;
    }
    
    .facebook-browser .terminal-body {
        padding: 0.25rem;
        font-size: 11px;
    }
}


