:root {
    --accent: #00e5ff;
    --accent-dim: #00b8d4;
    --bg-body: #0a0e14;
    --bg-panel: #0d1117;
    --bg-header: #131920;
    --bg-surface: #1a2233;
    --text-primary: #e0e6ed;
    --text-secondary: #8899aa;
    --status-ready: #3d5a6e;
    --status-active: #00e5ff;
    --status-speaking: #ffab40;
    --status-processing: #7c4dff;
}

* {
    box-sizing: border-box;
}

html,
body {
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

body {
    background-color: var(--bg-body);
    font-family: 'Rajdhani', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--text-primary);
}

/* Selection */
::selection {
    background: rgba(0, 229, 255, 0.3);
    color: #fff;
}

/* App Container */
.app-container {
    height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Control Panel */
.control-panel {
    height: 60px;
    background: var(--bg-header);
    display: flex;
    align-items: center;
    padding: 0 20px;
    gap: 15px;
    flex-shrink: 0;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.4), 0 1px 0 rgba(0, 229, 255, 0.15);
    border-bottom: 1px solid rgba(0, 229, 255, 0.1);
}

.action-icons {
    display: flex;
    gap: 8px;
    margin-left: auto;
}

/* App Title */
.app-title {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.app-title .main-title {
    font-family: 'Orbitron', sans-serif;
    color: var(--accent);
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    text-shadow: 0 0 10px rgba(0, 229, 255, 0.4);
    letter-spacing: 2px;
}

.app-title .subtitle {
    color: var(--text-secondary);
    margin: 0;
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: 1px;
}

/* Status Indicator */
.status-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: rgba(0, 229, 255, 0.08);
    border: 1px solid rgba(0, 229, 255, 0.15);
    border-radius: 20px;
    color: var(--text-primary);
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.85rem;
    font-weight: 500;
    min-width: 200px;
    width: 200px;
    justify-content: center;
    white-space: nowrap;
}

.status-indicator #statusText {
    text-align: center;
    min-width: 80px;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--status-ready);
    transition: all 0.3s ease;
}

.status-dot.ready {
    background-color: var(--status-ready);
}

.status-dot.active {
    background-color: var(--status-active);
    animation: pulse-glow 1.5s infinite;
}

.status-dot.speaking {
    background-color: var(--status-speaking);
    box-shadow: 0 0 10px var(--status-speaking), 0 0 20px rgba(255, 171, 64, 0.3);
}

.status-dot.processing {
    background-color: var(--status-processing);
    animation: spin 1s linear infinite;
}

@keyframes pulse-glow {
    0%,
    100% {
        opacity: 1;
        transform: scale(1);
        box-shadow: 0 0 4px rgba(0, 229, 255, 0.4);
    }

    50% {
        opacity: 0.7;
        transform: scale(1.2);
        box-shadow: 0 0 12px rgba(0, 229, 255, 0.7);
    }
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes border-glow-pulse {
    0%,
    100% {
        border-color: rgba(0, 229, 255, 0.1);
        box-shadow: inset 0 0 40px rgba(0, 229, 255, 0.02);
    }

    50% {
        border-color: rgba(0, 229, 255, 0.25);
        box-shadow: inset 0 0 40px rgba(0, 229, 255, 0.05);
    }
}

@keyframes fade-in-up {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Content Area */
.content-area {
    flex: 1;
    display: flex;
    overflow: hidden;
}

/* Panels */
.log-panel,
.transcript-panel {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.left-column {
    width: 40%;
    display: flex;
    flex-direction: column;
    height: 100%;
    border-right: 1px solid rgba(0, 229, 255, 0.08);
}

.log-panel {
    height: 40%;
    background-color: var(--bg-panel);
    border-bottom: 1px solid rgba(0, 229, 255, 0.08);
}

.transcript-panel {
    width: 60%;
    background-color: var(--bg-panel);
}

.questions-panel {
    height: 60%;
    background-color: var(--bg-panel);
    display: flex;
    flex-direction: column;
}

.questions-header-actions {
    display: flex;
    gap: 8px;
}

.questions-content {
    font-family: 'Exo 2', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 0.95rem;
    line-height: 1.5;
}

.question-item {
    padding: 8px 12px;
    margin-bottom: 6px;
    background: rgba(0, 229, 255, 0.05);
    border: 1px solid rgba(0, 229, 255, 0.1);
    border-radius: 6px;
    color: #b0b8c4;
    animation: fade-in-up 0.3s ease-out;
}

.question-item .question-number {
    color: var(--accent);
    font-family: 'Orbitron', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    margin-right: 8px;
}

.question-item:hover {
    border-color: rgba(0, 229, 255, 0.25);
    background: rgba(0, 229, 255, 0.08);
}

.panel-header {
    height: 44px;
    padding: 0 15px;
    background-color: var(--bg-header);
    border-bottom: 1px solid rgba(0, 229, 255, 0.08);
    font-family: 'Orbitron', sans-serif;
    font-weight: 600;
    font-size: 0.8rem;
    color: var(--accent-dim);
    flex-shrink: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    letter-spacing: 1px;
}

/* Log header clear button */
.log-header-actions {
    display: flex;
    gap: 8px;
}

.btn-clear-log {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    transition: all 0.3s;
}

.btn-clear-log:hover {
    background-color: var(--bg-surface);
    color: var(--accent);
}

.panel-header button {
    padding: 4px 8px;
    font-size: 0.8rem;
}

/* Transcription Panel Header Layout */
.transcription-header {
    justify-content: space-between;
}

.header-title-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.panel-title {
    font-family: 'Orbitron', sans-serif;
    font-weight: 600;
    font-size: 0.8rem;
    color: var(--accent-dim);
    letter-spacing: 1px;
}

/* Header icon buttons */
.btn-icon-header {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.btn-icon-header:hover {
    background-color: var(--bg-surface);
    color: var(--accent);
}

.btn-icon-header.btn-delete:hover {
    background-color: rgba(0, 229, 255, 0.1);
    color: var(--accent);
}

/* Copy button */
#copyBtn {
    border: 1px solid rgba(0, 229, 255, 0.2);
    color: var(--text-secondary);
}

#copyBtn:hover {
    background-color: rgba(0, 229, 255, 0.1);
    color: var(--accent);
    border-color: var(--accent);
}

/* Panel Content Areas */
.panel-content {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    border: 1px solid rgba(0, 229, 255, 0.1);
    box-shadow: inset 0 0 40px rgba(0, 229, 255, 0.03);
    animation: border-glow-pulse 4s ease-in-out infinite;
}

/* Log Panel Specific */
.log-content {
    font-family: 'Share Tech Mono', 'Courier New', monospace;
    font-size: 0.85rem;
    line-height: 1.5;
}

.log-entry {
    margin-bottom: 2px;
    padding: 1px 0;
    color: var(--text-secondary);
    animation: fade-in-up 0.2s ease-out;
}

.log-entry.speech-start {
    color: #ffab40;
}

.log-entry.speech-end {
    color: #69f0ae;
}

.log-entry.api-call {
    color: #40c4ff;
}

.log-entry.error {
    color: #ff5252;
}

.log-entry.success {
    color: #69f0ae;
}

.log-timestamp {
    color: var(--text-secondary);
    font-size: 0.75rem;
    margin-bottom: 2px;
}

.log-timestamp::before {
    content: '';
    display: inline-block;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background-color: var(--accent);
    box-shadow: 0 0 6px rgba(0, 229, 255, 0.6);
    margin-right: 6px;
    vertical-align: middle;
}

/* Transcript Panel */
.transcript-content {
    font-family: 'Exo 2', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 1.05rem;
    line-height: 1.6;
    white-space: pre-wrap;
    word-wrap: break-word;
    color: #b0b8c4;
}

.transcript-content:focus {
    outline: none;
}

/* Timestamp separator in transcript */
.transcript-timestamp {
    color: var(--text-secondary);
    font-style: italic;
}

/* Buttons */
.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s;
}

/* Toggle button - cyan accent */
.btn-toggle {
    background-color: var(--bg-surface);
    color: var(--accent);
    border: 1px solid var(--accent);
}

.btn-toggle:hover {
    background-color: rgba(0, 229, 255, 0.15);
    box-shadow: 0 0 12px rgba(0, 229, 255, 0.2);
}

/* Toggle button in active state (cyan pulsing) */
.btn-toggle.active {
    background-color: rgba(0, 229, 255, 0.15);
    color: var(--accent);
    border-color: var(--accent);
    animation: btn-pulse 2s ease-in-out infinite;
}

.btn-toggle.active:hover {
    background-color: rgba(0, 229, 255, 0.25);
    box-shadow: 0 0 16px rgba(0, 229, 255, 0.3);
}

@keyframes btn-pulse {
    0%, 100% {
        box-shadow: 0 0 4px rgba(0, 229, 255, 0.2);
    }
    50% {
        box-shadow: 0 0 14px rgba(0, 229, 255, 0.4);
    }
}

/* Icon buttons in control panel */
.btn-icon {
    background-color: rgba(0, 229, 255, 0.08);
    color: var(--text-primary);
    border: 1px solid rgba(0, 229, 255, 0.15);
    padding: 8px 12px;
}

.btn-icon:hover {
    background-color: rgba(0, 229, 255, 0.15);
    color: var(--accent);
    border-color: var(--accent);
    box-shadow: 0 0 8px rgba(0, 229, 255, 0.15);
}

.btn-icon:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* Modal Styles */
.modal-content {
    background-color: var(--bg-panel);
    border: 1px solid rgba(0, 229, 255, 0.12);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6), 0 0 20px rgba(0, 229, 255, 0.05);
}

.modal-header {
    background-color: var(--bg-header);
    border-bottom: 1px solid rgba(0, 229, 255, 0.1);
}

.modal-header .modal-title {
    font-family: 'Orbitron', sans-serif;
    color: var(--accent-dim);
    font-size: 0.95rem;
    letter-spacing: 1px;
}

.modal-header .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
}

.modal-body {
    color: var(--text-primary);
}

.modal-body .form-label {
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 500;
}

.modal-body .form-control {
    background-color: var(--bg-surface);
    border: 1px solid rgba(0, 229, 255, 0.2);
    color: #fff;
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.9rem;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.modal-body .form-control:focus {
    background-color: var(--bg-surface);
    border-color: var(--accent);
    box-shadow: 0 0 8px rgba(0, 229, 255, 0.15);
    color: var(--text-primary);
}

.modal-body .form-control::placeholder {
    color: var(--text-secondary);
    opacity: 0.6;
}

.modal-footer {
    background-color: var(--bg-header);
    border-top: 1px solid rgba(0, 229, 255, 0.1);
    gap: 8px;
}

.modal-footer .btn {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s;
}

.modal-footer .btn-secondary {
    background-color: var(--bg-surface);
    color: var(--text-secondary);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-footer .btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
}

.modal-footer .btn-primary {
    background-color: rgba(0, 229, 255, 0.15);
    color: var(--accent);
    border: 1px solid var(--accent);
}

.modal-footer .btn-primary:hover {
    background-color: rgba(0, 229, 255, 0.25);
    box-shadow: 0 0 12px rgba(0, 229, 255, 0.2);
}

.modal-footer .btn-outline-primary {
    background-color: transparent;
    color: var(--accent);
    border: 1px solid var(--accent);
}

.modal-footer .btn-outline-primary:hover {
    background-color: rgba(0, 229, 255, 0.15);
    box-shadow: 0 0 8px rgba(0, 229, 255, 0.15);
}

/* Scrollbar Styling */
.panel-content::-webkit-scrollbar {
    width: 6px;
}

.panel-content::-webkit-scrollbar-track {
    background: var(--bg-panel);
}

.panel-content::-webkit-scrollbar-thumb {
    background: rgba(0, 229, 255, 0.15);
    border-radius: 3px;
}

.panel-content::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 229, 255, 0.3);
}

