* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #e8f4f8 0%, #d4e9f0 50%, #c5dfe8 100%);
    min-height: 100vh;
    padding: 20px;
    color: #333;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

.branding {
    text-align: center;
    padding: 20px 0;
    margin-bottom: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.brand-logo {
    height: 60px;
    width: auto;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.15));
}

header {
    text-align: center;
    color: #2a2a2a;
    margin-bottom: 40px;
}

.header-icon {
    display: inline-block;
    margin-bottom: 15px;
}

.header-icon svg {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.15));
    stroke: #2c5364;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    font-weight: 600;
    color: #2c5364;
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.85;
    font-weight: 300;
    color: #555;
}

main {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

section {
    background: rgba(255, 255, 255, 0.98);
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
}

section h2 {
    margin-bottom: 20px;
    color: #2c5364;
    font-size: 1.3rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

section h2 svg {
    flex-shrink: 0;
}

.model-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.model-card {
    border: 2px solid #e8eef2;
    border-radius: 12px;
    padding: 25px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafb 100%);
}

.model-card:hover {
    border-color: #2c5364;
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(44, 83, 100, 0.25);
}

.model-card.selected {
    border-color: #2c5364;
    background: linear-gradient(135deg, #e8f4f8 0%, #d4e9f0 100%);
    box-shadow: 0 4px 12px rgba(44, 83, 100, 0.2);
}

.model-icon {
    margin-bottom: 15px;
    color: #2c5364;
}

.model-card.selected .model-icon {
    color: #10b981;
}

.model-card h3 {
    margin-bottom: 10px;
    color: #333;
}

.model-card p {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.select-btn {
    background: #2c5364;
    color: white;
    border: none;
    padding: 10px 25px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
    font-weight: 500;
}

.select-btn:hover {
    background: #203a43;
    transform: scale(1.05);
}

.model-card.selected .select-btn {
    background: #10b981;
}

.model-card.selected .select-btn:hover {
    background: #059669;
}

.status-info {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.status-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: linear-gradient(135deg, #f8fafb 0%, #e8eef2 100%);
    border-radius: 10px;
    border-left: 4px solid #2c5364;
}

.label {
    font-weight: 500;
    color: #555;
    display: flex;
    align-items: center;
    gap: 8px;
}

.label svg {
    color: #2c5364;
}

.value {
    font-weight: 600;
    color: #333;
}

.status-badge {
    padding: 6px 16px;
    border-radius: 20px;
    background: #e8eef2;
    color: #555;
    font-weight: 500;
}

.status-badge.active {
    background: #10b981;
    color: white;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
}

.controls {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.control-btn {
    flex: 1;
    min-width: 200px;
    padding: 15px 30px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.control-btn.primary {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.control-btn.primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.4);
    transform: translateY(-2px);
}

.control-btn.secondary {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.control-btn.secondary:hover:not(:disabled) {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    box-shadow: 0 6px 16px rgba(239, 68, 68, 0.4);
    transform: translateY(-2px);
}

.control-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-icon {
    font-size: 1.2rem;
}

.two-column {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-header h2 {
    margin-bottom: 0;
}

.icon-btn {
    background: #e8eef2;
    border: none;
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.icon-btn:hover {
    background: #2c5364;
    color: white;
    transform: scale(1.1);
}

.icon-btn svg {
    stroke: currentColor;
}

.transcript-container {
    background: linear-gradient(135deg, #f8fafb 0%, #ffffff 100%);
    border-radius: 10px;
    padding: 20px;
    min-height: 400px;
    max-height: 500px;
    overflow-y: auto;
    border: 1px solid #e8eef2;
}

.transcript-empty {
    text-align: center;
    color: #999;
    padding: 40px 20px;
    font-style: italic;
}

.transcript-entry {
    margin-bottom: 20px;
    padding: 15px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.transcript-entry .speaker {
    font-weight: 600;
    color: #2c5364;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.transcript-entry .speaker svg {
    width: 16px;
    height: 16px;
}

.transcript-entry .original {
    color: #333;
    margin-bottom: 8px;
    padding-left: 24px;
}

.transcript-entry .translation {
    color: #666;
    font-style: italic;
    padding-left: 24px;
    border-left: 3px solid #10b981;
    padding-left: 12px;
    margin-left: 12px;
}

.transcript-entry .timestamp {
    font-size: 0.85rem;
    color: #999;
    margin-top: 8px;
    text-align: right;
}

.accuracy-score {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e8eef2;
}

.score-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 6px;
}

.score-badge svg {
    width: 14px;
    height: 14px;
}

.score-badge.excellent {
    background: #d1fae5;
    color: #065f46;
}

.score-badge.good {
    background: #dbeafe;
    color: #1e40af;
}

.score-badge.fair {
    background: #fef3c7;
    color: #92400e;
}

.score-badge.poor {
    background: #fee2e2;
    color: #991b1b;
}

.score-details {
    font-size: 0.75rem;
    color: #666;
    margin-top: 4px;
}

.activity-log {
    min-height: 400px;
}

.log-container {
    background: linear-gradient(135deg, #f8fafb 0%, #ffffff 100%);
    border-radius: 10px;
    padding: 20px;
    min-height: 200px;
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #e8eef2;
}

.log-empty {
    text-align: center;
    color: #999;
    padding: 40px;
}

.log-entry {
    padding: 12px;
    margin-bottom: 10px;
    background: white;
    border-left: 4px solid #2c5364;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.log-entry .timestamp {
    font-size: 0.85rem;
    color: #999;
    margin-bottom: 5px;
}

.log-entry .message {
    color: #333;
}

footer {
    text-align: center;
    color: #555;
    padding: 30px 20px;
    margin-top: 40px;
    font-size: 0.9rem;
    opacity: 0.9;
}

footer strong {
    font-weight: 600;
    color: #2a2a2a;
}

@media (max-width: 1024px) {
    .two-column {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .brand-logo {
        height: 50px;
    }

    header h1 {
        font-size: 2rem;
    }
    
    .model-options {
        grid-template-columns: 1fr;
    }
    
    .controls {
        flex-direction: column;
    }
    
    .control-btn {
        min-width: 100%;
    }
    
    .two-column {
        grid-template-columns: 1fr;
    }
}


/* Metrics Summary Styles */
.metrics-summary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.metrics-summary h2 {
    color: white;
    margin-bottom: 25px;
}

.metrics-summary h2 svg {
    stroke: white;
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.metric-card {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: transform 0.2s, background 0.2s;
}

.metric-card:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.2);
}

.metric-label {
    font-size: 0.9rem;
    opacity: 0.9;
    margin-bottom: 10px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.metric-value {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 5px;
    line-height: 1;
}

.metric-unit {
    font-size: 0.85rem;
    opacity: 0.8;
    font-weight: 300;
}

/* Enhanced Transcript Entry with Metrics */
.transcript-entry {
    position: relative;
}

.transcript-metrics {
    display: flex;
    gap: 15px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    font-size: 0.85rem;
}

.transcript-metric {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #666;
}

.transcript-metric svg {
    width: 14px;
    height: 14px;
    stroke: currentColor;
}

.transcript-metric .metric-label {
    font-weight: 500;
    color: #888;
    text-transform: none;
    letter-spacing: normal;
    font-size: 0.85rem;
    margin: 0;
}

.transcript-metric .metric-value {
    font-weight: 600;
    color: #333;
    font-size: 0.85rem;
    margin: 0;
}

/* Latency indicator colors */
.latency-excellent { color: #10b981; }
.latency-good { color: #3b82f6; }
.latency-fair { color: #f59e0b; }
.latency-poor { color: #ef4444; }

/* Accuracy indicator colors */
.accuracy-excellent { color: #10b981; }
.accuracy-good { color: #3b82f6; }
.accuracy-fair { color: #f59e0b; }
.accuracy-poor { color: #ef4444; }
