* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    color: #333;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    background: white;
    border-radius: 15px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

header {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    padding: 25px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-content {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-logo {
    height: 50px;
    width: auto;
    object-fit: contain;
}

header h1 {
    font-size: 28px;
    font-weight: 600;
    margin: 0;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
}

.status {
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
}

.status.listening {
    background: #4caf50;
    animation: pulse 2s infinite;
}

.status.processing {
    background: #ff9800;
}

.status.speaking {
    background: #2196f3;
}

.status.error {
    background: #f44336;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.main-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    padding: 30px;
}

.conversation-panel {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 25px;
    border: 2px solid #e0e0e0;
    transition: all 0.3s ease;
}

.conversation-panel.active {
    border-color: #4caf50;
    box-shadow: 0 0 20px rgba(76, 175, 80, 0.3);
}

.person-panel {
    border-left: 4px solid #2196f3;
}

.officer-panel {
    border-left: 4px solid #ff9800;
}

.panel-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e0e0e0;
}

.panel-header h2 {
    font-size: 22px;
    margin-bottom: 15px;
    color: #1e3c72;
}

.language-selector {
    display: flex;
    align-items: center;
    gap: 10px;
}

.language-selector label {
    font-size: 14px;
    font-weight: 500;
    color: #555;
}

.language-selector select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    background: white;
    cursor: pointer;
    flex: 1;
}

.audio-controls {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.btn:active:not(:disabled) {
    transform: translateY(0);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-listen {
    background: linear-gradient(135deg, #4caf50 0%, #45a049 100%);
    color: white;
}

.btn-listen:hover:not(:disabled) {
    background: linear-gradient(135deg, #45a049 0%, #3d8b40 100%);
}

.btn-stop {
    background: linear-gradient(135deg, #f44336 0%, #d32f2f 100%);
    color: white;
}

.btn-stop:hover:not(:disabled) {
    background: linear-gradient(135deg, #d32f2f 0%, #c62828 100%);
}

.btn-speak {
    background: linear-gradient(135deg, #2196f3 0%, #1976d2 100%);
    color: white;
}

.btn-speak:hover:not(:disabled) {
    background: linear-gradient(135deg, #1976d2 0%, #1565c0 100%);
}

.btn-interpret {
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
    color: white;
}

.btn-interpret:hover:not(:disabled) {
    background: linear-gradient(135deg, #f57c00 0%, #e65100 100%);
}

.icon {
    font-size: 18px;
}

.transcript-box {
    background: white;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
    min-height: 200px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.original-text, .translated-text {
    margin-bottom: 20px;
}

.original-text:last-child, .translated-text:last-child {
    margin-bottom: 0;
}

.original-text h3, .translated-text h3 {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.original-text p, .translated-text p {
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    min-height: 40px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 3px solid #2196f3;
}

.translated-text p {
    border-left-color: #4caf50;
    font-weight: 500;
}

.audio-feedback {
    height: 60px;
    background: #f0f0f0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.waveform {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
}

.waveform-bar {
    width: 4px;
    background: #2196f3;
    border-radius: 2px;
    transition: height 0.1s ease;
}

.waveform.active .waveform-bar {
    animation: wave 0.5s ease-in-out infinite;
}

@keyframes wave {
    0%, 100% { height: 20%; }
    50% { height: 100%; }
}

.settings-panel {
    background: #f8f9fa;
    padding: 25px 30px;
    border-top: 2px solid #e0e0e0;
}

.settings-panel h3 {
    font-size: 18px;
    margin-bottom: 15px;
    color: #1e3c72;
}

.setting-item {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.setting-item label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: #555;
    cursor: pointer;
}

.setting-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.setting-item input[type="password"],
.setting-item select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    margin-left: 10px;
}

.setting-item input[type="password"] {
    min-width: 200px;
}

@media (max-width: 1024px) {
    .main-content {
        grid-template-columns: 1fr;
    }
}

footer {
    background: #f8f9fa;
    padding: 20px 30px;
    border-top: 2px solid #e0e0e0;
    text-align: center;
}

footer p {
    font-size: 14px;
    color: #666;
    margin: 0;
}

footer a {
    color: #1e3c72;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

footer a:hover {
    color: #2a5298;
    text-decoration: underline;
}

@media (max-width: 768px) {
    header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .header-content {
        flex-direction: column;
        align-items: center;
    }

    .audio-controls {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }
}

