/* Live Translation Video Chat - CSS Styles */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 30px;
}

.header h1 {
    color: white;
    font-size: 2.5em;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.header p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.1em;
    font-weight: 300;
}

/* Server Configuration */
.server-config {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 25px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.server-config h3 {
    color: white;
    margin-bottom: 20px;
    font-size: 1.3em;
}

.config-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.config-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.config-item label {
    color: white;
    font-weight: 500;
    font-size: 0.9em;
}

.config-item select,
.config-item input {
    padding: 12px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.9);
    font-size: 1em;
    transition: all 0.3s ease;
}

.config-item select:focus,
.config-item input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.3);
}

.server-config button {
    background: rgba(76, 175, 80, 0.8);
    border: none;
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1em;
    font-weight: 500;
    transition: all 0.3s ease;
    margin-bottom: 15px;
}

.server-config button:hover {
    background: rgba(76, 175, 80, 1);
    transform: translateY(-2px);
}

.server-status {
    padding: 10px 15px;
    border-radius: 20px;
    font-weight: 500;
    text-align: center;
    font-size: 0.9em;
    transition: all 0.3s ease;
}

.server-status.offline {
    background: rgba(244, 67, 54, 0.8);
    color: white;
}

.server-status.online {
    background: rgba(76, 175, 80, 0.8);
    color: white;
}

/* Room Section */
.room-section {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 25px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.room-section h3 {
    color: white;
    margin-bottom: 20px;
    font-size: 1.3em;
}

.room-input {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.room-input input {
    flex: 1;
    min-width: 200px;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.9);
    font-size: 1em;
}

.room-input button {
    background: rgba(33, 150, 243, 0.8);
    border: none;
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1em;
    font-weight: 500;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.room-input button:hover {
    background: rgba(33, 150, 243, 1);
    transform: translateY(-2px);
}

/* Status */
.status {
    text-align: center;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 25px;
    font-weight: 500;
    font-size: 1.1em;
    transition: all 0.3s ease;
}

.status.disconnected {
    background: rgba(244, 67, 54, 0.8);
    color: white;
}

.status.connected {
    background: rgba(76, 175, 80, 0.8);
    color: white;
}

/* Controls */
.controls {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 25px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.control-group label {
    color: white;
    font-weight: 500;
    font-size: 0.9em;
}

.control-group select,
.control-group button {
    padding: 12px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    font-size: 1em;
    transition: all 0.3s ease;
}

.control-group select {
    background: rgba(255, 255, 255, 0.9);
}

.control-group button {
    background: rgba(156, 39, 176, 0.8);
    border: none;
    color: white;
    cursor: pointer;
    font-weight: 500;
}

.control-group button:hover {
    background: rgba(156, 39, 176, 1);
    transform: translateY(-2px);
}

.control-group button:disabled {
    background: rgba(189, 189, 189, 0.6);
    cursor: not-allowed;
    transform: none;
}

/* Video Container */
.video-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.video-wrapper {
    position: relative;
    background: rgba(0, 0, 0, 0.8);
    border-radius: 15px;
    overflow: hidden;
    aspect-ratio: 16/9;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.video-wrapper video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 13px;
}

.video-label {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: 500;
}

/* Translation Panel */
.translation-panel {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 25px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.translation-panel h3 {
    color: white;
    margin-bottom: 20px;
    font-size: 1.3em;
    text-align: center;
}

.translation-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.translation-box {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 12px;
    padding: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    position: relative;
}

.translation-box h3 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.1em;
}

.translation-text {
    font-size: 1em;
    line-height: 1.6;
    color: #555;
    min-height: 60px;
    display: flex;
    align-items: center;
    padding: 10px;
    background: rgba(248, 249, 250, 0.8);
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.processing-indicator {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.processing-indicator.active {
    opacity: 1;
}

.conversation-message.own {
    border-left: none;
    border-right: 4px solid #28a745;
    background: #f8fff8;
    margin-left: auto;
    margin-right: 0;
    max-width: 70%;
    text-align: right;
}

.conversation-message.remote {
    border-left-color: #007bff;
    background: #f8f9ff;
    margin-left: 0;
    margin-right: auto;
    max-width: 70%;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* API Logs */
.api-logs {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 25px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.api-logs h4 {
    color: white;
    margin-bottom: 15px;
    font-size: 1.2em;
}

#apiLogContainer {
    background: rgba(0, 0, 0, 0.8);
    border-radius: 8px;
    padding: 15px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    color: #00ff00;
    min-height: 100px;
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.log-entry {
    margin-bottom: 5px;
    padding: 3px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.log-entry:last-child {
    border-bottom: none;
}

.log-timestamp {
    color: #888;
    font-size: 0.8em;
}

.log-success {
    color: #4caf50;
}

.log-error {
    color: #f44336;
}

.log-info {
    color: #2196f3;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 20px;
        margin: 10px;
    }

    .video-container {
        grid-template-columns: 1fr;
    }

    .translation-content {
        grid-template-columns: 1fr;
    }

    .config-grid {
        grid-template-columns: 1fr;
    }

    .controls {
        grid-template-columns: 1fr;
    }

    .room-input {
        flex-direction: column;
    }

    .room-input input {
        min-width: auto;
    }

    .header h1 {
        font-size: 2em;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 15px;
        margin: 5px;
    }

    .server-config,
    .room-section,
    .controls,
    .translation-panel,
    .api-logs {
        padding: 20px;
    }

    .header h1 {
        font-size: 1.8em;
    }

    .header p {
        font-size: 1em;
    }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* Neue Styles für das Unterhaltungsfeld - zu bestehender CSS hinzufügen */
.conversation-section {
    margin: 20px 0;
    padding: 20px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
}

.conversation-section h4 {
    margin: 0 0 15px 0;
    color: #495057;
    font-size: 1.1em;
}

.conversation-container {
    max-height: 1000px;
    overflow-y: auto;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 10px;
}

.conversation-placeholder {
    color: #6c757d;
    font-style: italic;
    text-align: center;
    padding: 20px;
}

.conversation-message {
    margin-bottom: 15px;
    padding: 12px;
    border-radius: 8px;
    border-left: 4px solid #007bff;
    background: #f8f9ff;
    animation: fadeIn 0.3s ease-in;
}

.conversation-message.own {
    border-left-color: #28a745;
    background: #f8fff8;
}

.conversation-message.remote {
    border-left-color: #007bff;
    background: #f8f9ff;
}

.conversation-time {
    font-size: 0.85em;
    color: #6c757d;
    margin-bottom: 5px;
}

.conversation-text {
    color: #495057;
    font-size: 1em;
    line-height: 1.4;
}

.conversation-original {
    font-size: 0.9em;
    color: #6c757d;
    margin-top: 5px;
    font-style: italic;
}

.clear-btn {
    background: #dc3545;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9em;
    transition: background-color 0.2s;
}

.clear-btn:hover {
    background: #c82333;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scrollbar-Styling für die Unterhaltung */
.conversation-container::-webkit-scrollbar {
    width: 8px;
}

.conversation-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.conversation-container::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.conversation-container::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}