* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #000;
    color: #fff;
    height: 100vh;
    overflow: hidden;
}

.container {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

.top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    background-color: #1a1a1a;
    z-index: 1000;
}

.logo img {
    height: 60px;
}

.desktop-nav {
    display: none;
}

.social-links {
    display: flex;
    gap: 20px;
}

.social-item img {
    height: 30px;
}

.chat-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

.video-container {
    position: sticky;
    top: 0;
    width: 300px;
    height: 300px;
    margin: 20px auto;
    border-radius: 50%;
    overflow: hidden;
    z-index: 10;
    background: #1a1a1a;
}

#talking-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.message {
    display: flex;
    align-items: flex-start;
    margin-bottom: 15px;
    max-width: 70%;
}

.message.user {
    margin-left: auto;
    flex-direction: row-reverse;
}

.message.bot {
    margin-right: auto;
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin: 0 10px;
    overflow: hidden;
    flex-shrink: 0;
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.message-content {
    padding: 10px 30px;
    border-radius: 15px;
    background-color: #333333;
}

.message.user .message-content {
    background-color: #4CAF50;
}

.input-area {
    display: flex;
    padding: 10px;
    background-color: #1a1a1a;
    position: sticky;
    bottom: 0;
}

#user-input {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 5px;
    background-color: #333333;
    color: #ffffff;
    resize: none;
    min-height: 40px;
}

#send-button {
    padding: 10px 20px;
    margin-left: 10px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.bottom-nav {
    display: flex;
    justify-content: space-around;
    padding: 10px;
    background-color: #1a1a1a;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #808080;
}

.nav-item.active {
    color: #ffffff;
}

.nav-item img {
    height: 24px;
    margin-bottom: 5px;
}

/* app style (<800px) */
@media (max-width: 799px) {
    .desktop-nav {
        display: none;
    }
    
    .top-nav {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
    }

    .chat-area {
        margin-top: 60px;
        margin-bottom: 60px;
    }

    .bottom-nav {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
    }
    .logo img{
        height: 40px;
    }
}

/* PC端样式 (>900px) */
@media (min-width: 900px) {
    .container {
        flex-direction: row;
    }
    
    .top-nav {
        width: 250px;
        height: 100vh;
        flex-direction: column;
        justify-content: flex-start;
        gap: 30px;
        padding: 30px 20px;
    }
    
    .desktop-nav {
        display: flex;
        flex-direction: column;
        gap: 15px;
    }
    
    .desktop-nav .nav-item {
        flex-direction: row;
        gap: 10px;
        padding: 10px;
        border-radius: 5px;
    }
    
    .desktop-nav .nav-item.active {
        background-color: #333333;
    }
    
    .desktop-nav .nav-item img {
        margin-bottom: 0;
    }
    
    .social-links {
        margin-top: auto;
        flex-direction: column;
    }
    
    .bottom-nav {
        display: none;
    }
    
    .chat-area {
        margin: 0;
        flex: 1;
    }
}
