:root {
    /* Catppuccin Mocha Theme Colors */
    --bg-base: #11111b;
    --bg-mantle: #181825;
    --bg-crust: #1e1e2e;
    --text: #cdd6f4;
    --subtext0: #a6adc8;
    --subtext1: #bac2de;
    --surface0: #313244;
    --surface1: #45475a;
    --surface2: #585b70;
    --overlay0: #6c7086;
    --overlay1: #7f849c;
    --overlay2: #9399b2;
    --lavender: #b4befe;
    --blue: #89b4fa;
    --sapphire: #74c7ec;
    --sky: #89dceb;
    --teal: #94e2d5;
    --green: #a6e3a1;
    --yellow: #f9e2af;
    --peach: #fab387;
    --maroon: #eba0ac;
    --red: #f38ba8;
    --mauve: #cba6f7;
    --pink: #f5c2e7;
    --flamingo: #f2cdcd;
    --rosewater: #f5e0dc;

    --shadow-glow: 0 0 20px rgba(180, 190, 254, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Geist Mono', monospace;
    background: var(--bg-base);
    color: var(--text);
    line-height: 1.4;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.terminal {
    background: var(--bg-base);
    border: 1px solid var(--surface0);
    border-radius: 0px;
    box-shadow: var(--shadow-glow);
    max-width: 900px;
    width: 100%;
    overflow: hidden;
}

.terminal-header {
    background: var(--bg-mantle);
    border-bottom: 1px solid var(--surface0);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.window-controls {
    display: flex;
    gap: 8px;
}

.control {
    width: 12px;
    height: 12px;
    border-radius: 0px;
    display: inline-block;
    background: var(--surface1);
}

.control.close {
    background: var(--red);
}

.control.minimize {
    background: var(--yellow);
}

.control.maximize {
    background: var(--green);
}

.title-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

.prompt {
    color: var(--green);
}

.title {
    color: var(--lavender);
    letter-spacing: 0.5px;
    font-weight: 700;
}

.cursor {
    color: var(--lavender);
    animation: blink 1s infinite;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

.terminal-body {
    padding: 24px;
}

.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--surface0);
}

.app-title {
    color: var(--text);
    font-size: 1.1em;
    font-weight: 400;
    letter-spacing: 0.5px;
}

.status-bar {
    display: flex;
    gap: 12px;
}

.status-item {
    background: var(--bg-crust);
    padding: 4px 8px;
    border-radius: 0px;
    font-size: 0.8em;
    color: var(--green);
    border: 1px solid var(--surface0);
}

.control-panel {
    background: var(--bg-mantle);
    border: 1px solid var(--surface0);
    border-radius: 0px;
    padding: 20px;
    margin-bottom: 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    align-items: end;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9em;
}

.label-text {
    color: var(--lavender);
    font-weight: 600;
}

.label-desc {
    color: var(--subtext0);
    font-size: 0.8em;
}

.terminal-input {
    background: var(--bg-base);
    border: 1px solid var(--surface0);
    border-radius: 0px;
    padding: 12px;
    color: var(--text);
    font-family: 'Geist Mono', monospace;
    font-size: 0.9em;
    transition: all 0.3s ease;
}

.terminal-input:focus {
    outline: none;
    border-color: var(--lavender);
    box-shadow: 0 0 10px rgba(180, 190, 254, 0.2);
}

.terminal-input::placeholder {
    color: var(--subtext0);
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.terminal-checkbox {
    width: 16px;
    height: 16px;
    background: var(--bg-base);
    border: 1px solid var(--surface0);
    border-radius: 0px;
    cursor: pointer;
}

.terminal-checkbox:checked {
    background: var(--lavender);
    border-color: var(--lavender);
}

.checkbox-label {
    color: var(--text);
    font-size: 0.9em;
    cursor: pointer;
}

.terminal-btn {
    background: var(--bg-base);
    border: 1px solid var(--surface0);
    border-radius: 0px;
    padding: 12px 20px;
    color: var(--text);
    font-family: 'Geist Mono', monospace;
    font-size: 0.9em;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    height: fit-content;
}

.terminal-btn:hover {
    background: var(--surface0);
    border-color: var(--lavender);
    transform: translateY(-1px);
}

.terminal-btn.primary {
    background: var(--lavender);
    border-color: var(--lavender);
    color: var(--bg-base);
}

.terminal-btn.primary:hover {
    background: var(--blue);
    border-color: var(--blue);
}

.terminal-btn.secondary {
    background: transparent;
    border-color: var(--surface1);
    color: var(--text);
}

.terminal-btn.secondary:hover {
    background: var(--surface0);
    border-color: var(--lavender);
}

.output-section {
    background: var(--bg-mantle);
    border: 1px solid var(--surface0);
    border-radius: 0px;
    margin-bottom: 20px;
}

.output-header {
    background: var(--bg-crust);
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--surface0);
}

.output-title {
    color: var(--lavender);
    font-weight: 600;
    font-size: 1em;
}

.output-stats {
    color: var(--subtext0);
    font-size: 0.8em;
}

.pyramid-output {
    padding: 30px 20px;
    font-family: 'Geist Mono', monospace;
    font-size: 1.1em;
    line-height: 1.2;
    text-align: center;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--bg-base);
}

.placeholder {
    color: var(--subtext0);
    font-style: italic;
}

.pyramid-row {
    color: var(--peach);
    letter-spacing: 1px;
    margin: 1px 0;
    white-space: pre;
}

.info-panel {
    background: var(--bg-mantle);
    border: 1px solid var(--surface0);
    border-radius: 0px;
}

.info-header {
    background: var(--bg-crust);
    padding: 12px 16px;
    border-bottom: 1px solid var(--surface0);
}

.info-title {
    color: var(--lavender);
    font-weight: 600;
    font-size: 1em;
}

.info-content {
    padding: 16px;
}

.pattern-stats {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--surface0);
}

.stat-item:last-child {
    border-bottom: none;
}

.stat-label {
    color: var(--subtext1);
    font-size: 0.9em;
}

.stat-value {
    color: var(--peach);
    font-weight: 600;
    font-size: 0.9em;
}

.terminal-footer {
    background: var(--bg-mantle);
    border-top: 1px solid var(--surface0);
    padding: 12px 16px;
}

.footer-stats {
    display: flex;
    justify-content: space-between;
    font-size: 0.8em;
    color: var(--subtext0);
}

.stat {
    font-family: 'Geist Mono', monospace;
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .terminal-body {
        padding: 16px;
    }

    .app-header {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }

    .control-panel {
        grid-template-columns: 1fr;
    }

    .footer-stats {
        flex-direction: column;
        gap: 8px;
    }

    .output-header {
        flex-direction: column;
        gap: 8px;
        align-items: flex-start;
    }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-mantle);
}

::-webkit-scrollbar-thumb {
    background: var(--surface1);
    border-radius: 0px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--surface2);
}