* {
    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, #0a0e27 0%, #1a1f3a 50%, #0f1419 100%);
    min-height: 100vh;
    padding: 20px;
    color: #e0e0e0;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(0, 255, 255, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(138, 43, 226, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    background: rgba(15, 20, 30, 0.85);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(0, 255, 255, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    overflow: hidden;
    position: relative;
    z-index: 1;
}

header {
    background: linear-gradient(135deg, rgba(10, 14, 39, 0.95) 0%, rgba(26, 31, 58, 0.95) 100%);
    color: #ffffff;
    padding: 30px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(0, 255, 255, 0.2);
    position: relative;
}

header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0, 255, 255, 0.5), transparent);
}

.header-content {
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-logo {
    height: 50px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 0 10px rgba(0, 255, 255, 0.3));
}

header h1 {
    font-size: 32px;
    font-weight: 700;
    margin: 0;
    background: linear-gradient(135deg, #00ffff 0%, #ffffff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
    text-shadow: 0 0 30px rgba(0, 255, 255, 0.3);
}

.header-subtitle {
    font-size: 12px;
    font-weight: 400;
    margin: 5px 0 0 0;
    opacity: 0.7;
    font-style: italic;
    color: #a0a0a0;
    letter-spacing: 0.5px;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
}

.status {
    padding: 10px 20px;
    background: rgba(0, 255, 255, 0.1);
    border: 1px solid rgba(0, 255, 255, 0.3);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    backdrop-filter: blur(10px);
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.2);
}

.status.listening {
    background: rgba(0, 255, 100, 0.15);
    border-color: rgba(0, 255, 100, 0.5);
    color: #00ff64;
    box-shadow: 0 0 25px rgba(0, 255, 100, 0.4);
    animation: pulse 2s infinite;
}

.status.processing {
    background: rgba(255, 165, 0, 0.15);
    border-color: rgba(255, 165, 0, 0.5);
    color: #ffa500;
    box-shadow: 0 0 25px rgba(255, 165, 0, 0.4);
}

.status.speaking {
    background: rgba(0, 150, 255, 0.15);
    border-color: rgba(0, 150, 255, 0.5);
    color: #0096ff;
    box-shadow: 0 0 25px rgba(0, 150, 255, 0.4);
}

.status.error {
    background: rgba(255, 50, 50, 0.15);
    border-color: rgba(255, 50, 50, 0.5);
    color: #ff3232;
    box-shadow: 0 0 25px rgba(255, 50, 50, 0.4);
}

@keyframes pulse {
    0%, 100% { 
        opacity: 1;
        box-shadow: 0 0 25px rgba(0, 255, 100, 0.4);
    }
    50% { 
        opacity: 0.8;
        box-shadow: 0 0 35px rgba(0, 255, 100, 0.6);
    }
}

.main-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    padding: 35px;
}

.conversation-panel {
    background: rgba(20, 25, 40, 0.6);
    backdrop-filter: blur(15px);
    border-radius: 20px;
    padding: 28px;
    border: 1px solid rgba(0, 255, 255, 0.15);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 8px 24px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    position: relative;
    overflow: hidden;
}

.conversation-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(0, 255, 255, 0.5), transparent);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.conversation-panel.active {
    border-color: rgba(0, 255, 100, 0.5);
    box-shadow: 
        0 0 30px rgba(0, 255, 100, 0.3),
        0 8px 24px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.conversation-panel.active::before {
    opacity: 1;
}

.person-panel {
    border-left: 3px solid rgba(0, 150, 255, 0.6);
}

.person-panel::before {
    background: linear-gradient(90deg, transparent, rgba(0, 150, 255, 0.5), transparent);
}

.officer-panel {
    border-left: 3px solid rgba(255, 165, 0, 0.6);
}

.officer-panel::before {
    background: linear-gradient(90deg, transparent, rgba(255, 165, 0, 0.5), transparent);
}

.panel-header {
    margin-bottom: 24px;
    padding-bottom: 18px;
    border-bottom: 1px solid rgba(0, 255, 255, 0.1);
    position: relative;
}

.panel-header::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, rgba(0, 255, 255, 0.6), transparent);
}

.panel-header h2 {
    font-size: 24px;
    margin-bottom: 16px;
    color: #ffffff;
    font-weight: 700;
    letter-spacing: -0.3px;
}

.language-selector {
    display: flex;
    align-items: center;
    gap: 12px;
}

.language-selector label {
    font-size: 13px;
    font-weight: 600;
    color: #a0a0a0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.language-selector select {
    padding: 10px 16px;
    border: 1px solid rgba(0, 255, 255, 0.2);
    border-radius: 10px;
    font-size: 14px;
    background: rgba(10, 15, 25, 0.8);
    color: #e0e0e0;
    cursor: pointer;
    flex: 1;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.language-selector select:hover {
    border-color: rgba(0, 255, 255, 0.4);
    background: rgba(15, 20, 30, 0.9);
}

.language-selector select:focus {
    outline: none;
    border-color: rgba(0, 255, 255, 0.6);
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.2);
}

.audio-controls {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.btn {
    padding: 14px 28px;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    letter-spacing: 0.3px;
    text-transform: uppercase;
    font-size: 13px;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn:hover:not(:disabled)::before {
    left: 100%;
}

.btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 
        0 6px 20px rgba(0, 0, 0, 0.4),
        0 0 30px rgba(0, 255, 255, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn:active:not(:disabled) {
    transform: translateY(0);
}

.btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    filter: grayscale(0.5);
}

.btn-listen {
    background: linear-gradient(135deg, rgba(0, 255, 100, 0.2) 0%, rgba(0, 200, 80, 0.2) 100%);
    color: #00ff64;
    border: 1px solid rgba(0, 255, 100, 0.4);
}

.btn-listen:hover:not(:disabled) {
    background: linear-gradient(135deg, rgba(0, 255, 100, 0.3) 0%, rgba(0, 200, 80, 0.3) 100%);
    box-shadow: 
        0 6px 20px rgba(0, 0, 0, 0.4),
        0 0 30px rgba(0, 255, 100, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-interpret {
    background: linear-gradient(135deg, rgba(255, 165, 0, 0.2) 0%, rgba(255, 140, 0, 0.2) 100%);
    color: #ffa500;
    border: 1px solid rgba(255, 165, 0, 0.4);
}

.btn-interpret:hover:not(:disabled) {
    background: linear-gradient(135deg, rgba(255, 165, 0, 0.3) 0%, rgba(255, 140, 0, 0.3) 100%);
    box-shadow: 
        0 6px 20px rgba(0, 0, 0, 0.4),
        0 0 30px rgba(255, 165, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-stop {
    background: linear-gradient(135deg, rgba(255, 50, 50, 0.2) 0%, rgba(200, 30, 30, 0.2) 100%);
    color: #ff3232;
    border: 1px solid rgba(255, 50, 50, 0.4);
}

.btn-stop:hover:not(:disabled) {
    background: linear-gradient(135deg, rgba(255, 50, 50, 0.3) 0%, rgba(200, 30, 30, 0.3) 100%);
    box-shadow: 
        0 6px 20px rgba(0, 0, 0, 0.4),
        0 0 30px rgba(255, 50, 50, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-speak {
    background: linear-gradient(135deg, rgba(0, 150, 255, 0.2) 0%, rgba(0, 120, 200, 0.2) 100%);
    color: #0096ff;
    border: 1px solid rgba(0, 150, 255, 0.4);
}

.btn-speak:hover:not(:disabled) {
    background: linear-gradient(135deg, rgba(0, 150, 255, 0.3) 0%, rgba(0, 120, 200, 0.3) 100%);
    box-shadow: 
        0 6px 20px rgba(0, 0, 0, 0.4),
        0 0 30px rgba(0, 150, 255, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-test {
    background: linear-gradient(135deg, rgba(138, 43, 226, 0.2) 0%, rgba(100, 30, 180, 0.2) 100%);
    color: #8a2be2;
    border: 1px solid rgba(138, 43, 226, 0.4);
}

.icon {
    font-size: 18px;
    filter: drop-shadow(0 0 5px currentColor);
}

.transcript-box {
    background: rgba(10, 15, 25, 0.6);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 18px;
    min-height: 200px;
    box-shadow: 
        inset 0 2px 8px rgba(0, 0, 0, 0.3),
        0 1px 0 rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(0, 255, 255, 0.1);
}

.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: 11px;
    color: #888;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 700;
}

.original-text p, .translated-text p {
    font-size: 16px;
    line-height: 1.7;
    color: #e0e0e0;
    min-height: 40px;
    padding: 16px;
    background: rgba(5, 10, 20, 0.8);
    border-radius: 12px;
    border-left: 3px solid rgba(0, 150, 255, 0.6);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
    font-family: 'SF Mono', 'Monaco', 'Courier New', monospace;
}

.translated-text p {
    border-left-color: rgba(0, 255, 100, 0.6);
    font-weight: 500;
    color: #ffffff;
}

.audio-feedback {
    height: 70px;
    background: rgba(5, 10, 20, 0.8);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid rgba(0, 255, 255, 0.1);
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.4);
}

.waveform {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.waveform-bar {
    width: 5px;
    background: linear-gradient(180deg, rgba(0, 255, 255, 0.8) 0%, rgba(0, 150, 255, 0.6) 100%);
    border-radius: 3px;
    transition: height 0.1s ease;
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.4);
}

.waveform.active .waveform-bar {
    animation: wave 0.5s ease-in-out infinite;
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.6);
}

@keyframes wave {
    0%, 100% { 
        height: 20%;
        opacity: 0.6;
    }
    50% { 
        height: 100%;
        opacity: 1;
    }
}

.settings-panel {
    background: rgba(15, 20, 30, 0.7);
    backdrop-filter: blur(15px);
    padding: 30px 40px;
    border-top: 1px solid rgba(0, 255, 255, 0.15);
    position: relative;
}

.settings-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0, 255, 255, 0.3), transparent);
}

.settings-panel h3 {
    font-size: 20px;
    margin-bottom: 20px;
    color: #ffffff;
    font-weight: 700;
    letter-spacing: -0.3px;
}

.setting-item {
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.setting-item label {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: #b0b0b0;
    cursor: pointer;
    transition: color 0.3s ease;
}

.setting-item label:hover {
    color: #ffffff;
}

.setting-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: rgba(0, 255, 255, 0.6);
}

.setting-item input[type="password"],
.setting-item select {
    padding: 10px 16px;
    border: 1px solid rgba(0, 255, 255, 0.2);
    border-radius: 10px;
    font-size: 14px;
    margin-left: 10px;
    background: rgba(10, 15, 25, 0.8);
    color: #e0e0e0;
    backdrop-filter: blur(10px);
}

.setting-item input[type="password"] {
    min-width: 200px;
}

footer {
    background: rgba(10, 15, 25, 0.8);
    backdrop-filter: blur(15px);
    padding: 24px 40px;
    border-top: 1px solid rgba(0, 255, 255, 0.15);
    text-align: center;
    position: relative;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0, 255, 255, 0.3), transparent);
}

footer p {
    font-size: 13px;
    color: #888;
    margin: 0;
    line-height: 1.8;
    letter-spacing: 0.3px;
}

footer a {
    color: rgba(0, 255, 255, 0.8);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.3);
}

footer a:hover {
    color: #00ffff;
    text-shadow: 0 0 15px rgba(0, 255, 255, 0.6);
    text-decoration: underline;
}

@media (max-width: 1024px) {
    .main-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    header {
        flex-direction: column;
        gap: 20px;
        text-align: center;
        padding: 25px 20px;
    }
    
    .header-content {
        flex-direction: column;
        align-items: center;
    }
    
    .header-subtitle {
        font-size: 11px;
    }
    
    header h1 {
        font-size: 26px;
    }

    .audio-controls {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .main-content {
        padding: 20px;
        gap: 20px;
    }
    
    .conversation-panel {
        padding: 20px;
    }
    
    footer {
        padding: 20px;
    }
    
    footer p {
        font-size: 12px;
        line-height: 1.8;
    }
}
