:root {
    --bg-color: #000000;
    --text-color: #ffb000; /* Classic terminal amber */
    --accent-color: #ff9900;
    --border-color: #ffb000;
    --font-family: 'Share Tech Mono', monospace;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-family);
    display: flex;
    justify-content: center;
    height: 100vh;
    height: 100dvh; /* Dynamic viewport height for modern mobile browsers */
    overflow: hidden; /* Prevent body scroll, let textarea scroll */
}

.app-container {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 1200px;
    height: 100%;
    padding: 15px;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 15px;
}

.header h1 {
    font-size: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.stats {
    font-size: 1.4rem;
    font-weight: bold;
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0; /* Important for flex child to allow inner scroll */
    border: 1px solid rgba(255, 176, 0, 0.3);
}

#editor {
    flex: 1;
    background-color: transparent;
    color: var(--text-color);
    font-family: var(--font-family);
    font-size: 1.1rem;
    line-height: 1.5;
    border: none;
    resize: none;
    outline: none;
    padding: 15px;
    overflow-y: auto;
}

#editor::placeholder {
    color: rgba(255, 176, 0, 0.4);
}

.footer {
    padding: 15px 0 5px 0;
    display: flex;
    justify-content: center;
    margin-top: 10px;
}

.footer-buttons-wrapper {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
    max-width: 515px; /* Fits two 250px buttons + 15px gap perfectly */
}

.footer-top {
    display: flex;
    gap: 15px;
    width: 100%;
}

.retro-btn {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-family);
    font-size: 1.3rem;
    padding: 18px 30px;
    border: 2px solid var(--border-color);
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: bold;
    transition: all 0.15s ease;
    width: 100%;
}

.retro-btn:hover {
    background-color: var(--text-color);
    color: var(--bg-color);
    box-shadow: 0 0 15px rgba(255, 176, 0, 0.5);
}

.retro-btn:active {
    transform: scale(0.97);
}

.btn-clear {
    color: #ff3333;
    border-color: #ff3333;
}

.btn-clear:hover {
    background-color: #ff3333;
    color: var(--bg-color);
    box-shadow: 0 0 15px rgba(255, 51, 51, 0.5);
}

.btn-share {
    color: #ffff00; /* Yellow-ish */
    border-color: #ffff00;
}

.btn-share:hover {
    background-color: #ffff00;
    color: var(--bg-color);
    box-shadow: 0 0 15px rgba(255, 255, 0, 0.5);
}

/* Custom Scrollbar for retro feel */
::-webkit-scrollbar {
    width: 14px;
}
::-webkit-scrollbar-track {
    background: var(--bg-color);
    border-left: 1px solid var(--border-color);
}
::-webkit-scrollbar-thumb {
    background: var(--text-color);
}
::-webkit-scrollbar-thumb:hover {
    background: var(--accent-color);
}

/* Responsive adjustments */
@media (max-width: 600px) {
    .app-container {
        padding: 10px;
    }
    .header {
        flex-direction: column;
        align-items: center;
        gap: 8px;
    }
    .header h1 {
        font-size: 1.4rem;
        text-align: center;
    }
    .stats {
        font-size: 1.6rem;
        font-weight: bold;
        text-shadow: 0 0 8px rgba(255, 176, 0, 0.5);
    }
    .retro-btn {
        padding: 15px;
        font-size: 1.1rem;
    }
    #editor {
        padding: 10px;
        font-size: 1rem;
    }
}
