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

:root {
    --primary-color: #4F46E5;
    --primary-hover: #4338CA;
    --secondary-color: #10B981;
    --danger-color: #EF4444;
    --bg-color: #F9FAFB;
    --card-bg: #FFFFFF;
    --text-primary: #111827;
    --text-secondary: #6B7280;
    --border-color: #E5E7EB;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* Promo Banner */
.promo-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: #FEF3C7;
    border-bottom: 2px solid #F59E0B;
    padding: 12px 20px;
    text-align: center;
    font-size: 14px;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.promo-banner a {
    color: #D97706;
    text-decoration: none;
    font-weight: 600;
}

.promo-banner a:hover {
    text-decoration: underline;
}

.container {
    width: 100%;
    max-width: 600px;
    margin-top: 50px;
}

/* Screens */
.screen {
    display: none;
    background: var(--card-bg);
    border-radius: 20px;
    padding: 40px 30px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.screen.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Landing Screen */
.logo {
    text-align: center;
    margin-bottom: 40px;
}

.logo h1 {
    font-size: 48px;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.tagline {
    font-size: 18px;
    color: var(--text-secondary);
}

.language-selection h2 {
    text-align: center;
    color: var(--text-primary);
    margin-bottom: 30px;
    font-size: 24px;
}

.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-primary);
    font-weight: 500;
}

.input-group select {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 16px;
    background: white;
    cursor: pointer;
    transition: all 0.3s;
}

.input-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* Buttons */
.btn-primary {
    width: 100%;
    padding: 16px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 20px;
}

.btn-primary:hover:not(:disabled) {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(79, 70, 229, 0.3);
}

.btn-primary:disabled {
    background: var(--border-color);
    cursor: not-allowed;
}

.btn-secondary {
    width: 100%;
    padding: 14px;
    background: white;
    color: var(--text-primary);
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 10px;
}

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

.btn-control {
    flex: 1;
    padding: 12px;
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-control:hover {
    border-color: var(--primary-color);
}

.btn-control.muted {
    background: var(--danger-color);
    color: white;
    border-color: var(--danger-color);
}

.info-text {
    text-align: center;
    color: var(--text-secondary);
    font-size: 14px;
    margin-top: 20px;
    line-height: 1.6;
}

/* Stats */
.stats {
    display: flex;
    gap: 20px;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid var(--border-color);
}

.stat {
    flex: 1;
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 32px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.stat-label {
    display: block;
    font-size: 14px;
    color: var(--text-secondary);
}

/* Waiting Screen */
.waiting-content {
    text-align: center;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 4px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    margin: 0 auto 30px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.waiting-content h2 {
    color: var(--text-primary);
    margin-bottom: 15px;
}

#queue-status {
    color: var(--text-secondary);
    font-size: 16px;
    margin-bottom: 10px;
}

.waiting-info {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 30px;
}

/* Chat Screen */
.chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 30px;
}

.partner-info h3 {
    color: var(--text-primary);
    margin-bottom: 5px;
}

#partner-languages {
    color: var(--text-secondary);
    font-size: 14px;
}

.session-timer {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
    font-variant-numeric: tabular-nums;
}

.connection-status {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: var(--bg-color);
    border-radius: 8px;
    margin-bottom: 30px;
}

.status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--secondary-color);
}

.status-indicator.connecting {
    background: #F59E0B;
    animation: pulse 1.5s ease infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.audio-visualizer {
    text-align: center;
    margin: 40px 0;
}

.audio-bars {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 8px;
    height: 60px;
    margin-bottom: 15px;
}

.bar {
    width: 6px;
    background: var(--primary-color);
    border-radius: 3px;
    animation: audioWave 0.8s ease infinite alternate;
}

.bar:nth-child(1) { animation-delay: 0s; height: 20%; }
.bar:nth-child(2) { animation-delay: 0.1s; height: 40%; }
.bar:nth-child(3) { animation-delay: 0.2s; height: 60%; }
.bar:nth-child(4) { animation-delay: 0.3s; height: 40%; }
.bar:nth-child(5) { animation-delay: 0.4s; height: 20%; }

@keyframes audioWave {
    to { height: 80%; }
}

.conversation-tips {
    background: var(--bg-color);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.conversation-tips h4 {
    color: var(--text-primary);
    margin-bottom: 12px;
}

.conversation-tips ul {
    list-style: none;
}

.conversation-tips li {
    color: var(--text-secondary);
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
}

.conversation-tips li:last-child {
    border-bottom: none;
}

.chat-controls {
    display: flex;
    gap: 10px;
    padding-top: 20px;
    border-top: 2px solid var(--border-color);
}

/* Disconnected Screen */
.disconnected-content {
    text-align: center;
}

.disconnected-content h2 {
    color: var(--text-primary);
    margin-bottom: 15px;
}

.disconnected-content p {
    color: var(--text-secondary);
    margin-bottom: 30px;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 15px;
    max-width: 400px;
    width: 90%;
    text-align: center;
}

.modal-content h3 {
    margin-bottom: 15px;
    color: var(--text-primary);
}

.modal-content p {
    color: var(--text-secondary);
    margin-bottom: 20px;
}

/* Responsive */
@media (max-width: 600px) {
    .screen {
        padding: 30px 20px;
    }

    .logo h1 {
        font-size: 36px;
    }

    .stats {
        flex-direction: column;
        gap: 10px;
    }

    .chat-controls {
        flex-direction: column;
    }
}
