:root {
    --bg-primary: #0a0e14;
    --bg-secondary: #141a23;
    --bg-tertiary: #1c2632;
    --text-primary: #e6edf3;
    --text-secondary: #7d8590;
    --accent: #58a6ff;
    --accent-glow: rgba(88, 166, 255, 0.3);
    --success: #3fb950;
    --warning: #d29922;
    --error: #f85149;
    --border: #30363d;
}

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

body {
    font-family: 'Space Grotesk', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    padding: 20px;
}

.container {
    width: 100%;
    max-width: 900px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: var(--bg-secondary);
    border-radius: 12px;
    border: 1px solid var(--border);
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo .icon {
    font-size: 28px;
}

.logo h1 {
    font-size: 1.4rem;
    font-weight: 600;
    background: linear-gradient(135deg, var(--accent), #a371f7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--bg-tertiary);
    border-radius: 20px;
}

.status .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    transition: background-color 0.3s;
}

.status .dot.connected {
    background: var(--success);
    box-shadow: 0 0 10px var(--success);
}

.status .dot.disconnected {
    background: var(--text-secondary);
}

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

.status .text {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

main {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.session-info {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 20px;
    background: var(--bg-secondary);
    border-radius: 10px;
    border: 1px solid var(--border);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
}

.session-label {
    color: var(--text-secondary);
}

.session-id {
    color: var(--accent);
    font-weight: 600;
}

.duration {
    margin-left: auto;
    color: var(--text-secondary);
    background: var(--bg-tertiary);
    padding: 4px 12px;
    border-radius: 6px;
}

.transcript-container {
    flex: 1;
    min-height: 400px;
    background: var(--bg-secondary);
    border-radius: 12px;
    border: 1px solid var(--border);
    overflow: hidden;
    position: relative;
}

.transcript-scroll {
    height: 100%;
    max-height: 60vh;
    overflow-y: auto;
    padding: 20px;
}

.transcript-scroll::-webkit-scrollbar {
    width: 8px;
}

.transcript-scroll::-webkit-scrollbar-track {
    background: var(--bg-tertiary);
}

.transcript-scroll::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

.transcript-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.placeholder {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.placeholder p {
    margin-bottom: 10px;
}

.placeholder .hint {
    font-size: 0.85rem;
    opacity: 0.7;
}

.transcript-entry {
    display: flex;
    gap: 15px;
    padding: 12px 16px;
    background: var(--bg-tertiary);
    border-radius: 8px;
    border-left: 3px solid var(--accent);
    animation: none;
}

.transcript-entry.new {
    animation: slideIn 0.3s ease-out;
    border-left-color: var(--success);
}

.transcript-entry.system {
    background: transparent;
    border-left-color: var(--warning);
    font-style: italic;
    color: var(--text-secondary);
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.transcript-entry .timestamp {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    color: var(--text-secondary);
    white-space: nowrap;
}

.transcript-entry .text {
    flex: 1;
    line-height: 1.5;
}

.live-indicator {
    position: absolute;
    top: 15px;
    right: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: rgba(248, 81, 73, 0.2);
    border: 1px solid var(--error);
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--error);
    opacity: 0;
    transition: opacity 0.3s;
}

.live-indicator.active {
    opacity: 1;
}

.live-indicator .pulse {
    width: 8px;
    height: 8px;
    background: var(--error);
    border-radius: 50%;
    animation: pulse 1.5s infinite;
}

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

footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: var(--bg-secondary);
    border-radius: 12px;
    border: 1px solid var(--border);
}

.stats {
    display: flex;
    gap: 30px;
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
    color: var(--accent);
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.controls {
    display: flex;
    gap: 10px;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background: var(--accent);
    color: var(--bg-primary);
}

.btn-primary:hover {
    background: #79b8ff;
    box-shadow: 0 0 20px var(--accent-glow);
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--border);
}

@media (max-width: 600px) {
    .container {
        padding: 10px;
    }
    
    header {
        flex-direction: column;
        gap: 15px;
    }
    
    .session-info {
        flex-wrap: wrap;
    }
    
    footer {
        flex-direction: column;
        gap: 15px;
    }
}

