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

body {
    font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #0a0a0f 0%, #1a1a2e 50%, #0f0f1a 100%);
    min-height: 100vh;
    color: #e0e0e0;
    overflow-y: auto;
}

.container {
    max-width: 640px;
    margin: 0 auto;
    padding: 40px 24px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

/* System Header */
.system-header {
    display: flex;
    justify-content: center;
    padding: 16px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.system-status {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 24px;
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: 8px;
}

.shield-icon {
    width: 24px;
    height: 24px;
    color: #22c55e;
}

.status-label {
    font-size: 14px;
    font-weight: 600;
    color: #22c55e;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.status-label.analyzing {
    color: #f59e0b;
}

/* Action Input Section */
.action-input-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.input-label {
    font-size: 13px;
    font-weight: 500;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.decision-input {
    width: 100%;
    padding: 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    color: #ffffff;
    font-size: 15px;
    font-family: inherit;
    resize: vertical;
    min-height: 100px;
    transition: border-color 0.2s, background 0.2s;
}

.decision-input:focus {
    outline: none;
    border-color: rgba(59, 130, 246, 0.5);
    background: rgba(255, 255, 255, 0.08);
}

.decision-input::placeholder {
    color: #6b7280;
}

.analyze-button {
    padding: 14px 28px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border: none;
    border-radius: 8px;
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.2s;
}

.analyze-button:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    transform: translateY(-1px);
}

.analyze-button:active {
    transform: translateY(0);
}

.analyze-button:disabled {
    background: #374151;
    cursor: not-allowed;
    transform: none;
}

.analyze-button.analyzing {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

/* Persona Selector */
.persona-selector {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.persona-label {
    font-size: 13px;
    font-weight: 500;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.persona-dropdown {
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    color: #ffffff;
    font-size: 14px;
    font-family: inherit;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%239ca3af' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
}

.persona-dropdown:focus {
    outline: none;
    border-color: rgba(59, 130, 246, 0.5);
}

.persona-dropdown option {
    background: #1a1a2e;
    color: #ffffff;
}

.persona-helper {
    font-size: 12px;
    color: #6b7280;
    font-style: italic;
}

/* Response Area - Intervention */
.response-area {
    background: rgba(239, 68, 68, 0.08);
    border: 2px solid rgba(239, 68, 68, 0.4);
    border-radius: 8px;
    padding: 20px;
    transition: all 0.3s;
}

.response-area.hidden {
    display: none;
}

.response-area.approved {
    background: rgba(34, 197, 94, 0.08);
    border-color: rgba(34, 197, 94, 0.4);
}

.intervention-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(239, 68, 68, 0.2);
}

.alert-icon {
    width: 20px;
    height: 20px;
    color: #ef4444;
}

.intervention-title {
    font-size: 13px;
    font-weight: 700;
    color: #ef4444;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.response-message {
    font-size: 15px;
    line-height: 1.6;
    color: #f3f4f6;
}

.speaking-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid rgba(239, 68, 68, 0.2);
}

.speaking-indicator.hidden {
    display: none;
}

.speaking-dot {
    width: 8px;
    height: 8px;
    background: #22c55e;
    border-radius: 50%;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.9); }
}

.speaking-text {
    font-size: 12px;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* System Footer */
.system-footer {
    display: flex;
    justify-content: space-between;
    padding: 16px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: auto;
}

.footer-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-align: center;
}

.footer-label {
    font-size: 10px;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-value {
    font-size: 12px;
    color: #9ca3af;
    font-weight: 500;
}

.footer-value.status-active {
    color: #22c55e;
}

/* Error state */
.response-area.error {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.6);
}

.response-area.error .intervention-title {
    color: #fca5a5;
}

/* Approved state */
.response-area.approved .intervention-header {
    border-bottom-color: rgba(34, 197, 94, 0.2);
}

.response-area.approved .alert-icon {
    color: #22c55e;
}

.response-area.approved .intervention-title {
    color: #22c55e;
}

.response-area.approved .intervention-title::before {
    content: "✓ ";
}
