/* General Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', 'SimSun', 'SimHei', sans-serif;
    line-height: 1.6;
    color: #000;
    background-color: #fff;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 100px 20px 20px 20px; /* Added 100px top padding to move content down */
    position: relative; /* Added for positioning the profile icon */
}

/* Header Styles */
header {
    text-align: center;
    margin-bottom: 40px;
    padding: 20px 0;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    color: #000;
}

header p {
    font-size: 1.2rem;
    color: #000;
}

/* Main Content Styles */
main {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.top-logo-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 20px auto;
    width: 100%;
    max-width: 500px; /* Adjusted from 400px to 500px */
}

#logo-video {
    width: 100%;
    max-width: 500px; /* Adjusted from 400px to 500px */
    display: block;
    height: 54px; /* Adjusted proportionally (500/600 * 65 = 54.17) */
    object-fit: cover;
    object-position: center;
    overflow: hidden;
}

.content-container {
    display: flex;
    align-items: flex-start;
    gap: 40px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.intro-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    padding: 20px;
}

.intro-title {
    font-family: 'Microsoft YaHei', 'SimSun', 'SimHei', sans-serif;
    color: #000;
    font-size: 2.4rem;
    line-height: 1.4;
    text-align: left;
    letter-spacing: 1px;
    width: 100%;
    margin-bottom: 20px;
    font-weight: bold;
}

.intro-text p {
    font-family: 'Microsoft YaHei', 'SimSun', 'SimHei', sans-serif;
    color: #000;
    font-size: 1.2rem;
    line-height: 1.8;
    text-align: left;
    letter-spacing: 1px;
    width: 100%;
    margin-bottom: 30px;
}

.cta-button {
    display: inline-block;
    background-color: #4e6ef2;
    color: white;
    font-size: 1.2rem;
    font-weight: 500;
    text-decoration: none;
    padding: 15px 40px;
    border-radius: 30px;
    transition: all 0.3s ease;
    text-align: center;
    margin-top: 10px;
}

.cta-button:hover {
    background-color: #3a56d4;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.video-section {
    flex: 1;
    padding: 25px;
    min-width: 300px; /* Ensure minimum width on mobile */
}

.video-section h2 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: #000;
    padding-bottom: 10px;
}

.video-container {
    position: relative;
    padding-bottom: 62%; /* Adjusted for better image display */
    height: 0;
    overflow: visible; /* Changed from hidden to visible to allow the comment container to overflow */
    max-width: 100%;
    margin-bottom: 40px; /* Increased to accommodate the overlapping comment */
    border-radius: 16px; /* Adding rounded corners to the container */
    background-color: #ffffff; /* White background for image container */
    z-index: 1; /* Ensure proper stacking */
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 16px; /* Adding rounded corners to the iframe */
}

.video-info {
    margin-top: 15px;
    color: #000;
    font-size: 0.9rem;
}

/* Typing Comment Styles */
.typing-comment-container {
    position: absolute;
    bottom: -40px; /* Adjusted position for better overlay with contained images */
    right: 30px;
    display: flex;
    align-items: center;
    background-color: rgb(255, 255, 255); /* Completely opaque */
    padding: 12px 20px;
    border-radius: 24px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    z-index: 100; /* Ensure it's above the image */
    max-width: 80%;
    overflow: hidden;
    opacity: 0; /* Start hidden */
    transition: opacity 0.5s ease; /* Fade in effect */
    transform: translateY(-30%); /* Move it up to create partial overlap */
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: #4e6ef2;
    margin-right: 12px;
    flex-shrink: 0;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="white"><path d="M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"/></svg>');
    background-size: 60%;
    background-position: center;
    background-repeat: no-repeat;
    border: 2px solid white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.typing-comment {
    font-family: 'Microsoft YaHei', 'SimSun', 'SimHei', sans-serif;
    font-size: 15px;
    color: #333;
    line-height: 1.4;
    word-break: break-word;
    min-width: 50px;
}

/* Blinking cursor animation */
.cursor {
    display: inline-block;
    width: 2px;
    height: 16px;
    background-color: #333;
    margin-left: 2px;
    vertical-align: middle;
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* Xiaohongshu Specific Styles */
.xiaohongshu-container {
    margin-top: 15px;
}

.xiaohongshu-container p {
    margin-bottom: 15px;
}

.xhs-link {
    display: block;
    text-decoration: none;
    color: #333;
    transition: transform 0.3s ease;
}

.xhs-link:hover {
    transform: translateY(-5px);
}

.xhs-preview {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 10px;
}

.xhs-preview img {
    width: 100%;
    display: block;
    transition: filter 0.3s ease;
}

.xhs-link:hover .xhs-preview img {
    filter: brightness(90%);
}

.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.play-button:before {
    content: "";
    width: 0;
    height: 0;
    border-top: 20px solid transparent;
    border-left: 30px solid #ff2442; /* Xiaohongshu red color */
    border-bottom: 20px solid transparent;
    margin-left: 8px;
}

/* Footer Styles */
footer {
    margin-top: 50px;
    text-align: center;
    padding: 20px 0;
    color: #000;
    font-size: 0.9rem;
}

/* Profile Icon Styles */
.profile-container {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

.profile-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #f0f0f0;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 2px solid #e0e0e0;
}

.profile-icon:hover {
    background-color: #e0e0e0;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.profile-icon svg {
    width: 24px;
    height: 24px;
    fill: #4e6ef2;
}

.profile-dropdown {
    position: absolute;
    top: 50px;
    right: 0;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    width: 200px;
    padding: 15px;
    display: none;
    flex-direction: column;
    gap: 10px;
    z-index: 1001;
    border: 1px solid #e0e0e0;
}

.profile-dropdown.show {
    display: flex;
}

.dropdown-item {
    padding: 10px;
    border-radius: 4px;
    text-decoration: none;
    color: #333;
    font-size: 14px;
    transition: background-color 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dropdown-item:hover {
    background-color: #f5f5f5;
}

.dropdown-item svg {
    width: 16px;
    height: 16px;
    fill: #4e6ef2;
}

.dropdown-divider {
    height: 1px;
    background-color: #e0e0e0;
    margin: 5px 0;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.login-form input {
    padding: 8px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    font-size: 14px;
}

.login-form button {
    padding: 8px 12px;
    background-color: #4e6ef2;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s ease;
}

.login-form button:hover {
    background-color: #3a56d4;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .container {
        padding: 60px 15px 15px 15px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .content-container {
        flex-direction: column;
        gap: 10px;
    }
    
    .intro-text, .video-section {
        padding: 15px;
        width: 100%;
    }
    
    .intro-title {
        font-size: 1.8rem;
        margin-bottom: 15px;
    }
    
    .intro-text p {
        font-size: 1rem;
        margin-bottom: 20px;
    }
    
    .top-logo-container {
        margin: 10px auto;
    }
    
    .profile-container {
        top: 10px;
        right: 10px;
    }
    
    /* Mobile slideshow specific styles */
    .mobile-slideshow {
        order: 2; /* Force slideshow below text on mobile */
        margin-top: 15px;
    }
    
    .video-container {
        padding-bottom: 75%;
        margin-top: 20px;
        display: block !important; /* Ensure display */
        visibility: visible !important; /* Ensure visibility */
    }
    
    #slideshow-image {
        display: block !important;
        visibility: visible !important;
    }
    
    .typing-comment-container {
        bottom: -30px;
        right: 20px;
        max-width: 85%;
        padding: 10px 15px;
    }
    
    .cta-button {
        padding: 12px 30px;
        font-size: 1.1rem;
        width: 100%;
        text-align: center;
    }
}

