/* Trait Selector Interface Styles */
:root {
    --green: #004225;      /* Primary actions */
    --amber: #CC7A00;      /* Active states, toggles */
    --bronze: #8B6914;     /* Secondary buttons */
    --gold: #D4AF37;       /* Accents, highlights */
    --bg-light: #F0EEE6;
    --text-dark: #333;
    --text-medium: #666;
    --text-light: #999;
}

/* Avatar Generator Component Styles */
.avatar-generator-component {
    background: var(--bg-light);
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    border: 2px solid var(--amber);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.avatar-generator-component:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.avatar-header {
    text-align: center;
    margin-bottom: 20px;
}

.avatar-header h3 {
    color: var(--green);
    margin: 0 0 8px 0;
    font-size: 1.4em;
    font-weight: bold;
}

.character-name {
    color: var(--amber);
    font-weight: 600;
    font-size: 1.1em;
}

.avatar-display {
    display: flex;
    justify-content: center;
    margin: 20px 0;
}

.avatar-image-container {
    border-radius: 50%;
    overflow: hidden;
    width: 120px;
    height: 120px;
    border: 3px solid var(--gold);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
}

.generated-avatar {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
}

.avatar-placeholder {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    border: 3px solid var(--gold);
    position: relative;
}

.placeholder-initial {
    font-size: 3em;
    font-family: 'Roboto Mono', monospace;
    margin-bottom: 8px;
}

.placeholder-label {
    font-size: 0.7em;
    text-align: center;
    opacity: 0.9;
    line-height: 1.2;
}

.character-details {
    text-align: center;
    margin: 20px 0;
}

.character-title {
    font-size: 1.2em;
    font-weight: bold;
    color: var(--green);
    margin-bottom: 8px;
}

.character-description {
    color: var(--text-medium);
    line-height: 1.4;
    margin-bottom: 12px;
}

.match-score {
    display: inline-flex;
    align-items: center;
    background: var(--amber);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: bold;
}

.score-label {
    margin-right: 8px;
}

.score-value {
    font-size: 1.1em;
}

.avatar-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 20px;
}

.avatar-btn {
    background: var(--bronze);
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.avatar-btn:hover {
    background: var(--amber);
    transform: translateY(-1px);
}

.avatar-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.chat-btn {
    background: var(--green);
    font-size: 0.95em;
    padding: 12px 20px;
    width: 100%;
    justify-content: center;
}

.chat-btn:hover {
    background: var(--amber);
    transform: translateY(-2px);
}

/* Results Container */
.avatar-results-container {
    grid-column: 1 / -1;
    margin-top: 20px;
    animation: slideInUp 0.6s ease-out;
}

.terminal-avatar-container {
    margin-top: 20px;
    animation: slideInUp 0.6s ease-out;
}

/* Avatar Display Container - replaces water ASCII animation */
.avatar-display-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    width: 90%;
    height: 85%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: slideInUp 0.6s ease-out;
}

.avatar-display-container .avatar-generator-component {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border: 3px solid var(--gold);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    max-width: 450px;
    width: 85%;
    height: 400px;
    border-radius: 16px;
    position: relative;
    margin-bottom: 80px;
}

.avatar-display-container .avatar-generator-component:hover {
    transform: scale(1.02);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
    border-color: var(--amber);
}

.avatar-display-container .avatar-header h3 {
    font-size: 1.4em;
    margin-bottom: 10px;
    color: var(--green);
}

.avatar-display-container .character-name {
    font-size: 1.1em;
    color: var(--amber);
}

.avatar-display-container .avatar-placeholder,
.avatar-display-container .avatar-image-container {
    width: 120px;
    height: 120px;
    border: 3px solid var(--gold);
    box-shadow: 0 4px 16px rgba(212, 175, 55, 0.3);
}

.avatar-display-container .placeholder-initial {
    font-size: 3em;
}

.avatar-display-container .character-details {
    margin: 16px 0;
}

.avatar-display-container .character-title {
    font-size: 1.1em;
    color: var(--green);
    margin-bottom: 6px;
}

.avatar-display-container .character-description {
    font-size: 0.9em;
    line-height: 1.3;
    color: var(--text-medium);
    margin-bottom: 10px;
}

.avatar-display-container .match-score {
    font-size: 0.85em;
    padding: 4px 10px;
}

.avatar-display-container .avatar-actions {
    margin-top: 16px;
}

.avatar-display-container .avatar-btn {
    font-size: 0.9em;
    padding: 8px 14px;
}

/* Big Five Scores Display */
.big-five-scores-display {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 16px;
    margin-top: 16px;
    border: 2px solid var(--amber);
    max-width: 400px;
    width: 100%;
}

.scores-header {
    text-align: center;
    margin-bottom: 16px;
}

.scores-header h4 {
    color: var(--green);
    margin: 0 0 8px 0;
    font-size: 1.1em;
}

.scores-legend {
    display: flex;
    justify-content: center;
    gap: 16px;
    font-size: 0.9em;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 2px;
}

.legend-color.user {
    background: var(--green);
}

.legend-color.character {
    background: var(--amber);
}

.scores-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.score-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.score-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9em;
    font-weight: 600;
    color: var(--text-dark);
}

.trait-icon {
    font-size: 1.1em;
}

.trait-name {
    flex: 1;
}

.score-bars {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.score-bar-container {
    background: #f0f0f0;
    border-radius: 10px;
    height: 20px;
    position: relative;
    overflow: hidden;
}

.score-bar {
    height: 100%;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 8px;
    transition: width 0.8s ease-out;
    position: relative;
}

.user-bar {
    background: linear-gradient(90deg, var(--green), #006b3a);
    color: white;
}

.character-bar {
    background: linear-gradient(90deg, var(--amber), var(--gold));
    color: white;
}

.score-value {
    font-size: 0.75em;
    font-weight: bold;
    white-space: nowrap;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* API Key Dialog Styles */
.api-key-dialog {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dialog-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
}

.dialog-content {
    background: var(--bg-light);
    padding: 30px;
    border-radius: 12px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.dialog-content h3 {
    color: var(--green);
    margin: 0 0 16px 0;
    text-align: center;
}

.dialog-content p {
    color: var(--text-medium);
    line-height: 1.4;
    margin: 0 0 16px 0;
}

.dialog-content input {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--amber);
    border-radius: 8px;
    font-size: 1em;
    margin-bottom: 20px;
    box-sizing: border-box;
}

.dialog-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.dialog-actions button {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s ease;
}

.dialog-actions button:first-child {
    background: var(--text-light);
    color: white;
}

.dialog-actions button:last-child {
    background: var(--green);
    color: white;
}

.dialog-actions button:hover {
    transform: translateY(-1px);
    opacity: 0.9;
}

.api-note {
    font-size: 0.85em;
    color: var(--text-light);
    font-style: italic;
    text-align: center;
    margin: 12px 0 0 0;
}

.trait-selector-container {
    max-width: 1400px;
    margin: 0 auto;
}

.trait-selector-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    min-height: 600px;
    height: auto;
    transition: min-height 0.3s ease;
}

.trait-selector-grid.expanded {
    min-height: 750px;
}

/* Trait Panel - Flip Container */
.trait-panel {
    border-radius: 0;
    padding: 12px;
    position: relative;
    perspective: 1000px;
    overflow: hidden;
    min-height: 600px;
}

.trait-panel-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.8s ease-in-out;
    transform-style: preserve-3d;
}

.trait-panel.flipped .trait-panel-inner {
    transform: rotateY(180deg);
}

.trait-panel-front,
.trait-panel-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 0;
    overflow: auto;
    display: flex;
    flex-direction: column;
    min-height: 600px;
}

.trait-panel-front {
    background: #ffffff;
}

.trait-panel-back {
    background: #001122;
    transform: rotateY(180deg);
}

/* Terminal Styles - Mac Style */
.terminal-container {
    width: 100%;
    height: 100%;
    background: #1e1e1e;
    color: #ffffff;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
    display: flex;
    flex-direction: column;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.terminal-header {
    background: #323232;
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid #444;
}

.terminal-buttons {
    display: flex;
    gap: 8px;
    margin-right: 12px;
}

.terminal-button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
}

.terminal-button.close {
    background: #ff5f57;
}

.terminal-button.minimize {
    background: #ffbd2e;
}

.terminal-button.maximize {
    background: #28ca42;
}

.terminal-button:hover {
    filter: brightness(1.1);
}

.terminal-title {
    color: #ffffff;
    font-size: 13px;
    font-weight: 500;
    flex: 1;
    text-align: center;
}

.terminal-close-btn {
    background: none;
    border: none;
    color: #888;
    cursor: pointer;
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 4px;
}

.terminal-close-btn:hover {
    background: #444;
    color: #fff;
}

.terminal-body {
    flex: 1;
    padding: 16px;
    background: #000000;
    border-radius: 0 0 12px 12px;
    overflow-y: auto;
}

.terminal-ascii-header {
    font-family: 'Roboto Mono', monospace;
    font-size: 10px;
    line-height: 1.1;
    color: #ffffff;
    margin-bottom: 8px;
    text-align: left;
    white-space: pre;
}

.terminal-output {
    color: #ffffff;
    font-size: 13px;
    font-family: 'Roboto Mono', monospace;
    line-height: 1.2;
    text-align: left;
    margin-bottom: 8px;
}

.terminal-output p {
    margin: 0 0 2px 0;
    text-align: left;
    font-family: 'Roboto Mono', monospace;
    color: #ffffff;
}

.terminal-separator {
    border-top: 1px solid #555;
    margin: 8px 0;
    width: 100%;
}

.terminal-title-printing {
    color: #ffffff;
}

.terminal-prompt-section {
    margin-top: auto;
    padding-top: 8px;
}

.terminal-input-line {
    display: flex;
    align-items: center;
    text-align: left;
}

.terminal-prompt {
    color: #4ade80;
    margin-right: 8px;
    font-weight: normal;
    font-family: 'Roboto Mono', monospace;
    white-space: nowrap;
}

.terminal-input {
    flex: 1;
    background: none;
    border: none;
    color: #ffffff;
    font-family: 'Roboto Mono', monospace;
    font-size: 13px;
    outline: none;
    caret-color: #4ade80;
}

.terminal-input::placeholder {
    color: #666;
}

/* Terminal cursor block */
.terminal-cursor {
    display: inline-block;
    width: 8px;
    height: 16px;
    background: #4ade80;
    margin-left: 2px;
    animation: terminal-cursor-blink 1s infinite;
}

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

/* Printer animation styles */
.terminal-line {
    opacity: 0;
    transform: translateY(-2px);
    transition: none;
}

.terminal-line.printing {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.1s ease-out, transform 0.1s ease-out;
}

.terminal-ascii-header {
    opacity: 0;
    transform: translateY(-2px);
}

.terminal-ascii-header.printing {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.2s ease-out, transform 0.2s ease-out;
}

.terminal-title-printing {
    opacity: 0;
    transform: translateY(-2px);
}

.terminal-title-printing.printing {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.1s ease-out, transform 0.1s ease-out;
}


/* Trait Categories */
.trait-categories {
    background: rgba(240, 238, 230, 0.95);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    flex-shrink: 0;
}

.category-title, .matrix-label {
    font-size: 15px;
    font-weight: 400;
    color: var(--text-dark);
    font-family: 'Roboto Mono', monospace;
}

/* Trait Selection Toggles */
.trait-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.trait-label {
    font-size: 13px;
    color: var(--text-medium);
    display: flex;
    align-items: center;
    gap: 6px;
}

.trait-icon {
    font-size: 12px;
}

.trait-toggle {
    width: 42px;
    height: 22px;
    background: #ddd;
    border-radius: 11px;
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
}

.trait-toggle.active {
    background: var(--amber);
}

.trait-toggle::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    background: white;
    border-radius: 50%;
    top: 2px;
    left: 2px;
    transition: all 0.2s ease;
}

.trait-toggle.active::after {
    left: 22px;
}

/* Current Selection Display */
.selection-display {
    position: absolute;
    top: 15px;
    right: 15px;
    margin-bottom: 0;
    flex-shrink: 0;
}

.selection-label {
    font-size: 13px;
    color: var(--text-medium);
    margin-bottom: 4px;
}

.selection-count {
    font-size: 15px;
    color: var(--amber);
    font-weight: 600;
}

.selection-text {
    color: var(--text-light);
    font-size: 13px;
}

/* Sound Bar Visualization */
.generation-display {
    margin-bottom: 12px;
    flex-shrink: 0;
}

/* OCEAN Personality Sliders */
.trait-slider-section {
    margin-bottom: 20px;
}

.trait-sliders {
    display: flex;
    flex-direction: column;
}

.trait-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 4px;
}

.trait-label {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 140px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
}

.trait-emoji {
    font-size: 16px;
}

.trait-slider {
    flex: 1;
    height: 2px;
    background: #ddd;
    outline: none;
    cursor: pointer;
    transition: all 0.2s ease;
    -webkit-appearance: none;
    appearance: none;
    border: none;
    accent-color: var(--green);
}

.trait-slider::-webkit-slider-track {
    height: 2px;
    background: #ddd;
    border: none;
    border-radius: 0;
}

.trait-slider::-webkit-slider-runnable-track {
    height: 2px;
    background: #ddd;
    border: none;
    border-radius: 0;
}

.trait-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    height: 16px;
    width: 16px;
    border-radius: 50%;
    background: var(--green);
    border: 1px solid white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: all 0.2s ease;
}

.trait-slider::-moz-range-track {
    height: 2px;
    background: #ddd;
    border: none;
}

.trait-slider::-moz-range-thumb {
    height: 16px;
    width: 16px;
    border-radius: 50%;
    background: var(--green);
    border: 1px solid white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    cursor: pointer;
}

.trait-slider:hover {
    background: rgba(0, 66, 37, 0.1);
}

.trait-slider:hover::-webkit-slider-thumb {
    transform: scale(1.1);
    background: #005f2e;
}

.trait-slider:hover::-moz-range-thumb {
    transform: scale(1.1);
    background: #005f2e;
}

.trait-slider:focus {
    background: rgba(0, 66, 37, 0.15);
}

.trait-slider:focus::-webkit-slider-thumb {
    box-shadow: 0 0 0 3px rgba(0, 66, 37, 0.2);
}

.trait-slider:focus::-moz-range-thumb {
    box-shadow: 0 0 0 3px rgba(0, 66, 37, 0.2);
}

.trait-value {
    min-width: 32px;
    text-align: center;
    font-family: 'Roboto Mono', monospace;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-medium);
    background: rgba(240, 238, 230, 0.8);
    padding: 4px 6px;
    border-radius: 4px;
    border: 1px solid rgba(204, 122, 0, 0.2);
}

/* Action Buttons Section */
.action-buttons-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 16px 4px 12px 4px;
    flex-shrink: 0;
}

.top-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 2px;
}

.action-btn.full-width {
    width: 100%;
    margin-top: 4px;
    flex: 1;
}

.action-btn {
    background: var(--bronze);
    color: white;
    border: none;
    border-radius: 0;
    padding: 8px 6px; /* Reduced from 12px 8px */
    font-size: 10px; /* Reduced from 12px */
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    font-family: 'Roboto Mono', monospace;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.action-btn:hover {
    transform: translateY(-1px);
    filter: brightness(1.1);
}

.random-btn {
    background: var(--bronze);
}

.reset-btn {
    background: var(--bronze);
}

.save-btn {
    background: var(--bronze);
}

.generate-btn {
    background: var(--green);
}

.generate-btn:hover {
    background: var(--amber);
}

.btn-shortcut {
    font-size: 9px;
    opacity: 0.8;
    font-weight: normal;
}


/* Action Buttons */
.action-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    flex-shrink: 0;
    padding: 0 4px 4px 4px;
    margin-top: 6px;
}

.action-button {
    background: var(--green);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 10px 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
    font-family: 'Roboto Mono', monospace;
}

.action-button.secondary {
    background: var(--bronze);
    color: white;
}

.action-button:hover {
    transform: translateY(-1px);
    filter: brightness(1.1);
}

.action-button.generating {
    background: #666;
    cursor: not-allowed;
}

.action-button.generating::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(212,175,55,0.2), transparent);
    animation: loading-shine 1.5s infinite;
}

@keyframes loading-shine {
    0% { left: -100%; }
    100% { left: 100%; }
}

.button-subtitle {
    font-size: 10px;
    opacity: 0.7;
    margin-top: 2px;
}

/* Terminal Interface - Mac Style */
.terminal-container {
    background: #1e1e1e;
    border-radius: 12px;
    padding: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Code', 'Roboto Mono', monospace;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.terminal-titlebar {
    background: #323232;
    height: 28px;
    display: flex;
    align-items: center;
    padding: 0 12px;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
    flex-shrink: 0;
}

.terminal-buttons {
    display: flex;
    gap: 8px;
}

.terminal-button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
}

.terminal-button.close {
    background: #ff5f57;
}

.terminal-button.minimize {
    background: #ffbd2e;
}

.terminal-button.maximize {
    background: #28ca42;
}

.terminal-button:hover {
    filter: brightness(1.1);
}

.terminal-title {
    flex: 1;
    text-align: center;
    color: #ffffff;
    font-size: 12px;
    font-weight: 500;
    margin: 0 12px;
}

.terminal-header {
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    text-align: left;
    flex-shrink: 0;
}

.terminal-output {
    flex: 1;
    background: #1e1e1e;
    padding: 0 16px;
    color: #ffffff;
    font-size: 12px;
    text-align: left !important;
    line-height: 1.5;
    overflow-y: auto;
    margin-bottom: 12px;
    min-height: 0;
}

.terminal-output > div {
    text-align: left !important;
}

.terminal-prompt {
    color: #61dafb;
}

.terminal-user {
    color: #61dafb;
    font-weight: 500;
}

.terminal-ai {
    color: #ffffff;
    margin-bottom: 8px;
    line-height: 1.6;
}

.terminal-input-container {
    display: flex;
    align-items: center;
    background: #1e1e1e;
    padding: 12px 16px 16px 16px;
    flex-shrink: 0;
}

.terminal-prompt-symbol {
    color: #61dafb;
    margin-right: 8px;
    font-weight: bold;
}

.terminal-input {
    flex: 1;
    background: none;
    border: none;
    color: #ffffff;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Code', 'Roboto Mono', monospace;
    font-size: 12px;
    outline: none;
    caret-color: #ffffff;
    visibility: visible !important;
    display: block !important;
    opacity: 1 !important;
}

.terminal-input::placeholder {
    color: #666;
}

.terminal-loading {
    color: #f39c12;
    animation: terminal-blink 1s infinite;
    font-style: italic;
}

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

/* Right Panel - Elliot Display */
.elliot-display {
    background: var(--green);
    border-radius: 16px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

/* Inner display container with box-in-box style */
.helix-container {
    background: rgba(240, 238, 230, 0.95);
    border-radius: 12px;
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Water ASCII Visualization */
.water-ascii {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    font-family: 'Roboto Mono', monospace;
    font-size: 12px;
    line-height: 1;
    color: var(--green);
    text-align: center;
    white-space: pre;
    user-select: none;
    overflow: hidden;
    width: 90%;
    height: 85%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.water-ascii.generating {
    color: var(--amber);
}

.water-ascii.active {
    color: var(--amber);
}

/* Radar Charts */
.radar-charts-container {
    position: absolute;
    bottom: -80px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 16px;
    z-index: 3;
    opacity: 0.3;
    transition: opacity 0.3s ease;
}

.radar-charts-container.active {
    opacity: 1;
}

.radar-chart-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.radar-chart-title {
    font-size: 0.75em;
    font-weight: 600;
    color: var(--green);
    font-family: 'Roboto Mono', monospace;
    text-align: center;
}

.radar-chart {
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid var(--amber);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

#asciiContent {
    margin: 0;
    padding: 0;
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
    color: inherit;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: color 0.3s ease;
    width: 100%;
    height: 100%;
    overflow: hidden;
    text-align: center;
}

/* Generation Animation Path */
.generation-path {
    position: absolute;
    top: 20%;
    left: 20%;
    width: 60%;
    height: 60%;
    border: 2px solid rgba(0, 66, 37, 0.3);
    border-radius: 50%;
    border-bottom: none;
    border-left: none;
    transform: rotate(-30deg);
    z-index: 1;
    opacity: 0;
    transition: all 0.6s ease;
}

.generation-path.active {
    opacity: 1;
    animation: path-glow 2s infinite;
}

@keyframes path-glow {
    0%, 100% { border-color: rgba(0, 66, 37, 0.3); }
    50% { border-color: var(--amber); }
}

/* Avatar Generation Label */
.avatar-label {
    position: absolute;
    bottom: 12px;
    right: 12px;
    z-index: 3;
    font-size: 11px;
    color: black;
    text-align: right;
    font-family: 'Roboto Mono', monospace;
    font-weight: 400;
}

/* Matrix Label positioning only */
.matrix-label {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 3;
    text-align: left;
}

/* Responsive */
@media (max-width: 768px) {
    .trait-selector-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto;
        height: auto;
        gap: 20px;
    }

    .elliot-display {
        order: 1;
        height: 400px;
    }

    .trait-panel {
        order: 2;
        height: 700px;
    }

    .generation-path {
        width: 50%;
        height: 50%;
        top: 25%;
        left: 25%;
    }

    .water-ascii {
        font-size: 10px;
    }

    .terminal-output {
        font-size: 10px;
    }

    .terminal-input {
        font-size: 11px;
    }

    .terminal-header {
        font-size: 12px;
    }
    
    /* Mobile OCEAN Traits Layout - Label+Value on top, Slider below */
    .trait-row {
        flex-direction: column;
        align-items: stretch;
        padding: 0 4px;
        position: relative; /* Changed to relative for absolute positioning children */
        margin-bottom: 8px;
    }
    
    /* Create a flex container for the first line using CSS Grid or Flexbox wrapper */
    .trait-row::before {
        content: '';
        display: flex;
        justify-content: space-between;
        align-items: center;
        order: -2; /* Ensure this appears first */
    }
    
    /* Label appears on first line - left side */
    .trait-label {
        font-size: 14px;
        font-weight: 600;
        position: absolute;
        top: 0;
        left: 4px;
    }
    
    /* Value appears on first line - right side */
    .trait-value {
        font-size: 14px;
        text-align: right;
        position: absolute;
        top: 0;
        right: 4px;
        min-width: 40px;
        padding: 2px 6px;
        background: rgba(240, 238, 230, 0.9);
        border-radius: 3px;
    }
    
    /* Second line: slider full width with top margin for label/value space */
    .trait-slider {
        width: 100%;
        height: 6px; /* Larger for better touch targets */
        margin-top: 24px; /* Space for label/value line above */
        position: static;
        display: block;
    }
    
    .trait-slider::-webkit-slider-thumb {
        height: 22px;
        width: 22px; /* Larger thumb for mobile */
    }
    
    .trait-slider::-moz-range-thumb {
        height: 22px;
        width: 22px;
    }
}