/* Chat Application Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    width: 100%;
    overflow: hidden;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* Testimonials Panel */
.testimonials-panel {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 20px 0;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    overflow: hidden;
}

.testimonials-container {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.testimonials-track {
    display: flex;
    gap: 24px;
    animation: scroll 60s linear infinite;
    width: fit-content;
}

    .testimonials-track:hover {
        animation-play-state: paused;
    }

@keyframes scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

.testimonial-card {
    flex-shrink: 0;
    width: 350px;
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

    .testimonial-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 8px 24px rgba(102, 126, 234, 0.2);
    }

.testimonial-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.testimonial-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 18px;
}

.testimonial-info {
    flex: 1;
}

.testimonial-name {
    font-weight: 600;
    color: #333;
    font-size: 16px;
    margin-bottom: 2px;
}

.testimonial-role {
    font-size: 13px;
    color: #666;
}

.testimonial-stars {
    color: #ffc107;
    font-size: 16px;
    margin-bottom: 12px;
}

.testimonial-text {
    color: #555;
    font-size: 14px;
    line-height: 1.6;
    font-style: italic;
}

.container {
    width: 100%;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0;
    padding: 0;
    padding-bottom: 120px; /* Space for testimonials panel */
}

.join-screen {
    background: white;
    border-radius: 16px;
    padding: 48px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    text-align: center;
    max-width: 480px;
    width: 90%;
}

    .join-screen h1 {
        color: #333;
        margin-bottom: 12px;
        font-size: 32px;
    }

    .join-screen p {
        color: #666;
        margin-bottom: 32px;
        font-size: 16px;
    }

.form-group {
    margin-bottom: 20px;
    text-align: left;
}

    .form-group label {
        display: block;
        margin-bottom: 8px;
        color: #333;
        font-weight: 500;
        font-size: 14px;
    }

    .form-group input {
        width: 100%;
        padding: 14px 16px;
        border: 2px solid #e0e0e0;
        border-radius: 8px;
        font-size: 16px;
        transition: border-color 0.3s;
    }

        .form-group input:focus {
            outline: none;
            border-color: #667eea;
        }

.btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

    .btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
    }

    .btn:active {
        transform: translateY(0);
    }

    .btn:disabled {
        opacity: 0.6;
        cursor: not-allowed;
        transform: none;
    }

.error-message {
    background: #fee;
    color: #c33;
    padding: 12px;
    border-radius: 8px;
    margin-top: 16px;
    font-size: 14px;
    display: none;
}

    .error-message.show {
        display: block;
    }

.chat-screen {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    flex-direction: column;
    background: white;
    z-index: 2000;
}

    .chat-screen.show {
        display: flex;
    }

.chat-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

    .chat-header h2 {
        font-size: 20px;
        font-weight: 600;
    }

.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.url-display {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.15);
    padding: 8px 12px;
    border-radius: 6px;
}

    .url-display input {
        background: transparent;
        border: none;
        color: white;
        font-size: 13px;
        width: 300px;
        outline: none;
    }

        .url-display input::selection {
            background: rgba(255, 255, 255, 0.3);
        }

.copy-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.5);
    padding: 6px 14px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: background 0.2s;
    white-space: nowrap;
}

    .copy-btn:hover {
        background: rgba(255, 255, 255, 0.3);
    }

    .copy-btn.copied {
        background: rgba(76, 175, 80, 0.9);
        border-color: rgba(76, 175, 80, 1);
    }

.disconnect-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid white;
    padding: 8px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.2s;
}

    .disconnect-btn:hover {
        background: rgba(255, 255, 255, 0.3);
    }

.chat-body {
    display: flex;
    flex: 1;
    overflow: hidden;
}

.chat-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
}

.messages {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    background: #f3f2f1;
}

.message {
    margin-bottom: 4px;
    padding: 8px 16px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
    animation: slideIn 0.2s ease;
}

    .message:hover {
        background-color: #edebe9;
    }

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message-header {
    display: flex;
    align-items: baseline;
    margin-bottom: 2px;
    gap: 8px;
}

.message-sender {
    font-weight: 600;
    color: #242424;
    font-size: 14px;
    line-height: 20px;
}

.message-time {
    font-size: 12px;
    color: #616161;
    font-weight: 400;
    line-height: 16px;
}

.message-content {
    color: #242424;
    font-size: 14px;
    line-height: 20px;
    margin-left: 0;
    word-wrap: break-word;
    font-weight: 400;
}

.system-message {
    text-align: center;
    color: #616161;
    font-size: 12px;
    font-style: italic;
    margin: 16px 0;
    padding: 4px 0;
}

.message-input-area {
    padding: 20px 24px;
    background: white;
    border-top: 2px solid #e0e0e0;
    display: flex;
    gap: 12px;
    flex-shrink: 0;
}

.message-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    transition: border-color 0.3s;
}

    .message-input:focus {
        outline: none;
        border-color: #667eea;
    }

.send-btn {
    padding: 12px 28px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s;
}

    .send-btn:hover {
        transform: translateY(-2px);
    }

.users-panel {
    width: 280px;
    background: white;
    border-left: 2px solid #e0e0e0;
    padding: 24px;
    overflow-y: auto;
    flex-shrink: 0;
}

    .users-panel h3 {
        color: #333;
        margin-bottom: 16px;
        font-size: 16px;
        font-weight: 600;
    }

.user-list {
    list-style: none;
}

.user-item {
    padding: 10px 12px;
    background: #f8f9fa;
    border-radius: 6px;
    margin-bottom: 8px;
    color: #333;
    font-size: 14px;
    display: flex;
    align-items: center;
}

    .user-item::before {
        content: '';
        display: inline-block;
        width: 8px;
        height: 8px;
        background: #4caf50;
        border-radius: 50%;
        margin-right: 10px;
    }

.hidden {
    display: none;
}

.show {
    display: block;
}

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 4px;
}

    ::-webkit-scrollbar-thumb:hover {
        background: #5568d3;
    }

@media (max-width: 768px) {
    .url-display input {
        width: 150px;
    }

    .users-panel {
        width: 220px;
    }

    .testimonials-panel {
        padding: 12px 0;
    }

    .testimonial-card {
        width: 280px;
    }

    .container {
        padding-bottom: 100px;
    }
}
