/* THEME SCREEN MODAL */
.theme-screen {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9998;
    background: #181818;
    color: #cfcfcf;
    font-family: 'Iosevka', monospace;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
    overflow: hidden;
}
.theme-modal {
    max-width: 480px;
    width: 100%;
    background: #222;
    border-radius: 6px;
    box-shadow: 0 2px 16px #0008;
    padding: 32px 24px;
    border: 1px solid #333;
    display: flex;
    flex-direction: column;
    align-items: stretch;
}
.theme-title {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 18px;
    letter-spacing: 0.5px;
}
.theme-desc {
    font-size: 15px;
    margin-bottom: 24px;
    color: #aaa;
}
.theme-input-row {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
}
.theme-input {
    flex: 1;
    font-size: 16px;
    padding: 8px 12px;
    border-radius: 3px;
    border: 1px solid #444;
    background: #181818;
    color: #cfcfcf;
    font-family: 'Iosevka', monospace;
}
.theme-random-btn {
    background: #222;
    color: #cfcfcf;
    border: 1px solid #444;
    border-radius: 3px;
    font-size: 16px;
    padding: 8px 16px;
    cursor: pointer;
    font-family: 'Iosevka', monospace;
}
.theme-generate-btn {
    width: 100%;
    background: #181818;
    color: #cfcfcf;
    border: 1px solid #444;
    border-radius: 3px;
    font-size: 18px;
    padding: 12px 0;
    cursor: pointer;
    font-family: 'Iosevka', monospace;
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Iosevka', monospace;
    min-height: 100vh;
    position: relative;
}

@supports (font-family: emoji) {
    body {
        font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, emoji, sans-serif;
    }
}

#topBar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 70px;
    background: #0C0C0C;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 10000;
    display: flex;
    align-items: center;
    padding: 0 40px;
    gap: 15px;
    font-family: 'Iosevka', monospace;
}

#topBar button {
    border-width: 2px;
    box-shadow: 1px 1px 0 rgba(255, 255, 255, 0.25),
        2px 2px 0 rgba(255, 255, 255, 0.18),
        3px 3px 0 rgba(255, 255, 255, 0.12),
        4px 4px 0 rgba(255, 255, 255, 0.08);
    letter-spacing: 1.2px;
    text-transform: uppercase;
    position: relative;
    user-select: none;
    -webkit-user-select: none;
    touch-action: manipulation;
}

#regenerateButton {
    padding: 12px 24px;
    background: transparent;
    color: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 400;
    font-family: 'Iosevka', monospace;
    letter-spacing: 0.5px;
    transition: all 0.2s;
    margin-left: auto;
}

#regenerateButton:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.6);
    color: rgba(255, 255, 255, 1);
}

#regenerateButton:active {
    background: rgba(255, 255, 255, 0.1);
}

#topBar button:active {
    box-shadow: 0px 0px 0px 0px;
    transform: translate(4px, 4px);
}

#regenerateButton:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    border-color: rgba(255, 255, 255, 0.1);
}

.button-wave-char {
    display: inline-block;
    animation: buttonWave 1.2s ease-in-out infinite;
}

@keyframes buttonWave {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

#loadingOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #0C0C0C;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    z-index: 9999;
    font-family: 'Iosevka', monospace;
    color: #ffffff;
    overflow: hidden;
    padding: 80px;
}

#consoleOutput {
    width: 100%;
    height: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    font-size: 19px;
    line-height: 1.8;
    letter-spacing: 0.5px;
}

.console-line {
    color: rgba(255, 255, 255, 0.6);
    margin: 10px 0;
    white-space: pre-wrap;
    word-wrap: break-word;
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.console-line.fading {
    opacity: 0;
    transform: translateY(-30px);
}

.console-line::before {
    content: '> ';
    color: rgba(255, 255, 255, 0.3);
}

.console-line.status {
    color: rgba(100, 255, 218, 0.8);
}

.console-line.status::before {
    content: '✓ ';
    color: rgba(100, 255, 218, 0.8);
}

.console-line.error {
    color: rgba(255, 100, 100, 0.8);
}

.console-line.info {
    color: rgba(255, 200, 100, 0.8);
}

#loadingHeader {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin: 30px 0 15px 0;
    gap: 20px;
}

#mainStatus {
    font-size: 42px;
    color: rgba(255, 255, 255, 0.95);
    font-weight: 600;
    letter-spacing: 2px;
    flex: 1 1 auto;
}

#themeStatus {
    font-size: 24px;
    color: rgba(255, 255, 255, 0.8);
    letter-spacing: 1px;
    text-align: left;
    flex: 0 0 auto;
    max-width: 45%;
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

#currentMessage {
    font-size: 24px;
    color: rgba(255, 255, 255, 0.7);
    margin: 10px 0;
    min-height: 1.2em;
}

.typing-cursor {
    display: inline-block;
    width: 3px;
    height: 1em;
    background: rgba(255, 255, 255, 0.8);
    margin-left: 4px;
    animation: blink 1s step-end infinite;
    vertical-align: text-bottom;
}

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

.progress-container {
    margin-top: 40px;
    width: 100%;
}

.progress-label {
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
    margin-bottom: 10px;
}

.progress-bar-container {
    width: 100%;
    height: 3px;
    background: rgba(255, 255, 255, 0.1);
    overflow: hidden;
    position: relative;
}

.progress-bar {
    height: 100%;
    background: rgba(255, 255, 255, 0.5);
    width: 0%;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.4);
    transition: width 0.3s ease-in-out;
}

@keyframes progressWidth {
    0% { width: 0%; }
    50% { width: 75%; }
    100% { width: 92%; }
}

#loadingOverlay.hidden {
    display: none;
}

#generatedContent {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 5000;
    display: block;
}

/* Mobile responsive styles */
@media (max-width: 768px) {
    #mainStatus {
        font-size: 28px;
    }
    
    .console-line {
        font-size: 13px;
        margin: 8px 0;
    }
}

@media (max-width: 480px) {
    #mainStatus {
        font-size: 24px;
    }
    
    .console-line {
        font-size: 12px;
        margin: 6px 0;
    }
}
