/* Candy.ai Combined CSS - Enhanced Glassmorphism Theme */

/* Hero Banner Carousel Styles */
.hero-banner {
    margin-bottom: 30px;
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.banner-carousel {
    position: relative;
    width: 1200px;
    max-width: 95vw;
    height: 380px;
    overflow: hidden;
    border-radius: 20px;
    margin: 0 auto;
}

.banner-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.8s cubic-bezier(0.25, 0.1, 0.25, 1);
    background: rgba(25, 25, 30, 0.5);
    backdrop-filter: blur(30px) saturate(150%);
    -webkit-backdrop-filter: blur(30px) saturate(150%);
    border: 1px solid rgba(80, 80, 90, 0.5);
    box-shadow: 
        0 8px 32px 0 rgba(0, 0, 0, 0.5),
        inset 0 1px 0 0 rgba(255, 255, 255, 0.1);
    overflow: visible;
    border-radius: 20px;
}

.banner-slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(162, 89, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 50%, rgba(248, 163, 255, 0.1) 0%, transparent 50%);
    pointer-events: none;
    z-index: 1;
}

.banner-slide.active {
    opacity: 1;
    transform: translateX(0);
}

.banner-slide.prev {
    transform: translateX(-100%);
}

/* Full Image Banner Styles */
.banner-full-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    background: linear-gradient(90deg, #2a2a2d 25%, #3a3a3f 50%, #2a2a2d 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

/* Banner 3 Split Layout */
.banner-split-container {
    display: flex;
    width: 100%;
    height: 100%;
    align-items: center;
    gap: 30px;
    padding: 20px;
}

.banner-video-side {
    flex: 0 0 500px;
    height: calc(100% - 40px);
    overflow: hidden;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
}

.banner-video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.banner-text-side {
    flex: 1;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: rgba(25, 25, 30, 0.6);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    border: 1px solid rgba(80, 80, 90, 0.5);
}

.banner-split-title {
    font-size: 2.2rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-pink));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 25px;
    line-height: 1.3;
    text-shadow: 0 2px 20px rgba(162, 89, 255, 0.3);
}

.banner-split-cta {
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-pink));
    border: none;
    padding: 15px 40px;
    border-radius: 50px;
    color: white;
    font-weight: 600;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(162, 89, 255, 0.4);
    align-self: flex-start;
}

.banner-split-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 30px rgba(162, 89, 255, 0.6);
}

.banner-content {
    display: flex;
    align-items: center;
    height: 100%;
    padding: 30px;
    position: relative;
    z-index: 2;
}

/* Banner 1 - Horizontal Layout */
.banner-content:not(.vertical-layout) {
    justify-content: space-between;
}

.banner-text-left {
    flex: 1;
    max-width: 50%;
    z-index: 2;
    position: relative;
}

.banner-image-right {
    flex: 1;
    max-width: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 2;
}

/* Banner 2 & 3 - Vertical Layouts */
.vertical-layout {
    gap: 20px;
}

.vertical-layout .banner-image-left,
.vertical-layout .banner-image-right {
    flex: 0 0 auto;
    width: 200px;
    height: 220px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 2;
}

.vertical-layout .banner-text-right,
.vertical-layout .banner-text-left {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    z-index: 2;
}

.vertical-layout.reverse {
    flex-direction: row-reverse;
}

.banner-title {
    font-size: 1.8rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-pink));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: var(--accent-purple); /* Fallback */
    margin-bottom: 10px;
    line-height: 1.2;
    text-shadow: 0 2px 10px rgba(162, 89, 255, 0.3);
}

.banner-subtitle {
    font-size: 1rem;
    color: var(--text-silver);
    margin-bottom: 15px;
    opacity: 0.9;
}

.banner-cta {
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-pink));
    border: none;
    padding: 12px 30px;
    border-radius: 50px;
    color: white;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(162, 89, 255, 0.3);
    align-self: flex-start;
}

.banner-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(162, 89, 255, 0.4);
}

.banner-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    display: block;
}

.banner-img.vertical {
    height: 220px;
    width: auto;
    object-fit: cover;
}

/* Banner Navigation */
.banner-nav {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 15px;
    position: relative;
    z-index: 10;
    width: 100%;
}

.nav-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid var(--accent-purple);
    background: transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0.5;
}

.nav-dot.active {
    background: var(--accent-purple);
    opacity: 1;
    box-shadow: 0 0 15px rgba(162, 89, 255, 0.5);
}

.nav-dot:hover {
    opacity: 0.8;
    transform: scale(1.1);
}

/* Auth Button Styles */
.auth-button {
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-pink));
    border: none;
    padding: 10px 20px;
    border-radius: 50px;
    color: white;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-left: 10px;
}

.auth-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(162, 89, 255, 0.4);
}

.auth-button i {
    margin-right: 5px;
}

/* Login Button - Outlined Style */
.login-btn {
    background: transparent !important;
    border: 2px solid var(--accent-purple) !important;
    color: var(--accent-purple) !important;
}

.login-btn:hover {
    background: rgba(162, 89, 255, 0.1) !important;
    border-color: var(--accent-pink) !important;
    color: var(--accent-pink) !important;
    box-shadow: 0 4px 20px rgba(162, 89, 255, 0.3) !important;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 20px;
    box-sizing: border-box;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: rgba(26, 26, 26, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 2rem;
    width: 90%;
    max-width: 400px;
    position: relative;
    border: 1px solid rgba(162, 89, 255, 0.3);
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 24px;
    color: #ffffff;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.1);
}

.modal-subtitle {
    color: #cccccc;
    font-size: 0.9rem;
    margin: -10px 0 20px 0;
    text-align: center;
}

.form-buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.form-buttons .submit-btn {
    flex: 1;
}

.submit-btn.secondary {
    background: transparent;
    border: 1px solid rgba(162, 89, 255, 0.5);
    color: #A259FF;
}

.submit-btn.secondary:hover {
    background: rgba(162, 89, 255, 0.1);
    border-color: #A259FF;
}

.modal-title {
    font-size: 2rem;
    margin-bottom: 30px;
    text-align: center;
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-pink));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Form Styles */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    position: relative;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 15px 20px;
    background: rgba(60, 60, 70, 0.3);
    border: 1px solid rgba(80, 80, 90, 0.5);
    border-radius: 10px;
    color: white;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--accent-purple);
    background: rgba(60, 60, 70, 0.5);
    box-shadow: 0 0 20px rgba(162, 89, 255, 0.2);
}

.form-group input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.form-row {
    display: flex;
    gap: 15px;
}

.form-group.half {
    flex: 1;
}

.submit-btn {
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-pink));
    border: none;
    padding: 15px 30px;
    border-radius: 50px;
    color: white;
    font-weight: 600;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(162, 89, 255, 0.6);
}

.submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 4px 20px rgba(162, 89, 255, 0.3);
}

.submit-btn .fa-spinner {
    animation: spin 1s linear infinite;
    margin-right: 8px;
}

.auth-switch {
    text-align: center;
    color: var(--text-silver);
    margin-top: 20px;
}

.auth-switch a {
    color: var(--accent-purple);
    text-decoration: none;
    font-weight: 600;
}

.auth-switch a:hover {
    color: var(--accent-pink);
}

.auth-disclaimer {
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
    margin-top: 20px;
    line-height: 1.4;
}

.auth-disclaimer a {
    color: var(--accent-purple);
    text-decoration: underline;
}

/* Auth UI Styles */
#auth-container {
    width: 100%;
}

.auth-ui-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.auth-title {
    font-size: 1.8rem;
    text-align: center;
    margin-bottom: 10px;
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-pink));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 15px;
    color: var(--text-silver);
    font-size: 0.9rem;
    opacity: 0.7;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(80, 80, 90, 0.5);
}

.social-auth {
    display: flex;
    gap: 12px;
}

.social-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    background: rgba(60, 60, 70, 0.3);
    border: 1px solid rgba(80, 80, 90, 0.5);
    border-radius: 10px;
    color: white;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.social-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(162, 89, 255, 0.4);
    background: rgba(162, 89, 255, 0.1);
    border-color: rgba(162, 89, 255, 0.6);
}

.social-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 4px 15px rgba(162, 89, 255, 0.2);
}

.social-btn .fa-spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.social-btn i {
    margin-right: 8px;
    font-size: 1.1rem;
}

.social-btn .x-icon {
    margin-right: 8px;
    font-size: 1.2rem;
    font-weight: bold;
    color: #ffffff;
    display: inline-block;
}

.submit-btn.login-style {
    background: transparent !important;
    color: var(--accent-purple) !important;
    border: 2px solid var(--accent-purple) !important;
}

.submit-btn.login-style:hover {
    background: rgba(162, 89, 255, 0.1) !important;
    box-shadow: 0 6px 30px rgba(162, 89, 255, 0.3) !important;
}

/* Supabase Auth UI Overrides */

#auth-container .supabase-auth-ui_ui-container {
    gap: 16px;
}

#auth-container .supabase-auth-ui_ui-button {
    border-radius: 50px !important;
    padding: 12px 24px !important;
    font-weight: 600 !important;
    transition: all 0.3s ease !important;
}

#auth-container .supabase-auth-ui_ui-button:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 30px rgba(162, 89, 255, 0.4) !important;
}

/* Style for social provider buttons */
#auth-container .supabase-auth-ui_ui-button[data-provider] {
    background: rgba(60, 60, 70, 0.3) !important;
    border: 1px solid rgba(80, 80, 90, 0.5) !important;
    color: white !important;
}

#auth-container .supabase-auth-ui_ui-button[data-provider]:hover {
    background: rgba(60, 60, 70, 0.5) !important;
    border-color: var(--accent-purple) !important;
}

#auth-container .supabase-auth-ui_ui-input {
    background: rgba(60, 60, 70, 0.3) !important;
    border: 1px solid rgba(80, 80, 90, 0.5) !important;
    border-radius: 10px !important;
    color: white !important;
    padding: 12px 16px !important;
}

#auth-container .supabase-auth-ui_ui-input:focus {
    border-color: var(--accent-purple) !important;
    background: rgba(60, 60, 70, 0.5) !important;
    box-shadow: 0 0 20px rgba(162, 89, 255, 0.2) !important;
}

#auth-container .supabase-auth-ui_ui-label {
    color: var(--text-silver) !important;
    margin-bottom: 8px !important;
}

#auth-container .supabase-auth-ui_ui-anchor {
    color: var(--accent-purple) !important;
    text-decoration: none !important;
}

#auth-container .supabase-auth-ui_ui-anchor:hover {
    color: var(--accent-pink) !important;
}

#auth-container .supabase-auth-ui_ui-divider {
    background: rgba(80, 80, 90, 0.5) !important;
    margin: 20px 0 !important;
}

/* Responsive Design */

/* Large screens (1200px+) */
@media (min-width: 1201px) {
    .banner-carousel {
        width: 1200px;
        height: 380px;
    }
    
    .character-grid {
        grid-template-columns: repeat(4, 1fr);
        max-width: 1200px;
    }
}

/* Medium-large screens (992px-1200px) */
@media (max-width: 1240px) {
    .banner-carousel {
        width: calc(100% - 40px);
        margin: 0 20px;
        height: 350px;
    }
    
    .banner-full-img {
        object-fit: cover;
        object-position: center;
    }
    
    .character-grid {
        max-width: 1000px;
        gap: 16px;
    }
}

/* Medium screens (768px-992px) - Tablets */
@media (max-width: 992px) {
    .banner-carousel {
        width: calc(100% - 30px);
        margin: 0 15px;
        height: 300px;
    }
    
    .banner-full-img {
        object-fit: cover;
        object-position: center;
    }
    
    .banner-split-container {
        flex-direction: column;
        gap: 20px;
        padding: 15px;
    }
    
    .banner-video-side {
        flex: none;
        height: 200px;
        width: 100%;
    }
    
    .banner-text-side {
        padding: 20px;
        flex: 1;
    }
    
    .banner-split-title {
        font-size: 1.8rem;
    }
    
    .nav-dot {
        width: 14px;
        height: 14px;
    }
    
    .character-grid {
        grid-template-columns: repeat(3, 1fr);
        max-width: 700px;
        gap: 15px;
    }
    
    .header-right {
        gap: 10px;
    }
    
    .auth-button {
        padding: 8px 16px;
        font-size: 0.9rem;
    }
}

/* Small-medium screens (480px-768px) - Large phones/small tablets */
@media (max-width: 768px) {
    .banner-carousel {
        height: 250px;
        width: calc(100% - 20px);
        margin: 0 10px;
    }
    
    .banner-full-img {
        object-fit: cover;
        object-position: center;
        width: 100%;
        height: 100%;
    }
    
    .banner-split-container {
        flex-direction: column;
        gap: 15px;
        padding: 10px;
    }
    
    .banner-video-side {
        height: 150px;
        width: 100%;
        flex: none;
    }
    
    .banner-text-side {
        padding: 15px;
        flex: 1;
    }
    
    .banner-split-title {
        font-size: 1.5rem;
        line-height: 1.4;
    }
    
    .banner-split-cta {
        padding: 12px 30px;
        font-size: 1rem;
    }
    
    .nav-dot {
        width: 16px;
        height: 16px;
        border-width: 2px;
    }
    
    .character-grid {
        grid-template-columns: repeat(2, 1fr);
        max-width: 500px;
        gap: 12px;
    }
    
    .page-title, .section-title {
        font-size: 28px;
    }
    
    .title-section, .faq-section {
        padding: 20px;
    }
    
    .character-lobby {
        padding: 0 20px 40px;
    }
    
    .accordion-header h3 {
        font-size: 16px;
    }
    
    .character-name {
        font-size: 20px;
    }
    
    .character-bio {
        font-size: 12px;
    }
    
    /* Header responsive */
    .header-container {
        padding: 0 15px;
    }
    
    .header-nav {
        display: none;
    }
    
    .header-right {
        gap: 8px;
    }
    
    .auth-button {
        padding: 6px 12px;
        font-size: 0.85rem;
    }
    
    .auth-button i {
        margin-right: 3px;
    }
    
    .logo-img {
        height: 28px;
        max-width: 120px;
        margin-top: 6px;
    }
    
    /* Make menu toggle more prominent on mobile */
    .menu-toggle {
        padding: 8px;
        border-radius: 6px;
        background: rgba(162, 89, 255, 0.1);
        border: 1px solid rgba(162, 89, 255, 0.3);
        transition: all 0.3s ease;
    }
    
    .menu-toggle:hover {
        background: rgba(162, 89, 255, 0.2);
        border-color: rgba(162, 89, 255, 0.5);
    }
    
    .menu-toggle i {
        font-size: 18px;
    }
}

/* Small screens (320px-480px) - Phones */
@media (max-width: 480px) {
    .banner-carousel {
        height: 200px;
        width: calc(100% - 16px);
        margin: 0 8px;
        border-radius: 15px;
    }
    
    .banner-slide {
        border-radius: 15px;
    }
    
    .banner-full-img {
        object-fit: cover;
        object-position: center;
        width: 100%;
        height: 100%;
    }
    
    .banner-split-container {
        padding: 8px;
        gap: 10px;
        flex-direction: column;
    }
    
    .banner-video-side {
        height: 120px;
        border-radius: 15px;
        width: 100%;
        flex: none;
    }
    
    .banner-text-side {
        padding: 12px;
        border-radius: 15px;
        flex: 1;
    }
    
    .banner-split-title {
        font-size: 1.2rem;
        line-height: 1.3;
        margin-bottom: 15px;
    }
    
    .banner-split-cta {
        padding: 10px 24px;
        font-size: 0.9rem;
    }
    
    .nav-dot {
        width: 18px;
        height: 18px;
        border-width: 3px;
    }
    
    .banner-nav {
        margin-top: 12px;
        gap: 10px;
    }
    
    .character-grid {
        grid-template-columns: repeat(1, 1fr);
        max-width: 300px;
        gap: 15px;
    }
    
    .page-title, .section-title {
        font-size: 24px;
    }
    
    .logo-img {
        height: 24px;
        max-width: 100px;
        margin-top: 6px;
    }
    
    .logo-text {
        font-size: 24px;
    }
    
    .header-container {
        padding: 0 12px;
    }
    
    .header-right {
        gap: 6px;
    }
    
    .auth-button {
        padding: 5px 10px;
        font-size: 0.8rem;
    }
    
    /* Single column layout for very small screens */
    .character-card {
        aspect-ratio: 4/5;
    }
    
    .faq-section {
        padding: 15px;
    }
    
    .accordion-header {
        padding: 12px 15px;
    }
    
    .accordion-content {
        padding: 0 15px;
    }
    
    .accordion-content.active {
        padding: 12px 15px;
    }
}

/* Modal Responsive Design */
@media (max-width: 768px) {
    .modal-overlay {
        padding: 15px;
        align-items: flex-start;
        padding-top: 60px;
    }
    
    .modal-content {
        padding: 25px;
        border-radius: 15px;
        max-width: none;
    }
    
    .modal-close {
        top: 15px;
        right: 15px;
        width: 35px;
        height: 35px;
        font-size: 24px;
    }
    
    .modal-title {
        font-size: 1.5rem;
        margin-bottom: 20px;
    }
    
    .auth-title {
        font-size: 1.5rem;
        margin-bottom: 15px;
    }
    
    .form-group {
        margin-bottom: 15px;
    }
    
    .form-group input,
    .form-group select {
        padding: 12px 16px;
        font-size: 0.95rem;
    }
    
    .social-auth {
        flex-direction: column;
        gap: 10px;
    }
    
    .social-btn {
        padding: 12px 16px;
        font-size: 0.95rem;
    }
    
    .submit-btn {
        padding: 12px 24px;
        font-size: 1rem;
    }
    
    .auth-divider {
        margin: 20px 0;
        font-size: 0.85rem;
    }
    
    .auth-switch {
        font-size: 0.9rem;
        margin-top: 15px;
    }
    
    .auth-disclaimer {
        font-size: 0.8rem;
        margin-top: 15px;
    }
    
    .profile-dropdown {
        min-width: 160px;
        right: 10px !important;
    }
    
    .dropdown-item {
        padding: 10px 16px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .modal-overlay {
        padding: 10px;
        padding-top: 40px;
    }
    
    .modal-content {
        padding: 20px;
        border-radius: 12px;
    }
    
    .modal-close {
        top: 10px;
        right: 10px;
        width: 30px;
        height: 30px;
        font-size: 20px;
    }
    
    .modal-title {
        font-size: 1.3rem;
        margin-bottom: 15px;
    }
    
    .auth-title {
        font-size: 1.3rem;
        margin-bottom: 12px;
    }
    
    .form-group {
        margin-bottom: 12px;
    }
    
    .form-group input,
    .form-group select {
        padding: 10px 14px;
        font-size: 0.9rem;
    }
    
    .social-btn {
        padding: 10px 14px;
        font-size: 0.9rem;
    }
    
    .submit-btn {
        padding: 10px 20px;
        font-size: 0.95rem;
    }
    
    .auth-divider {
        margin: 15px 0;
        font-size: 0.8rem;
    }
    
    .auth-switch {
        font-size: 0.85rem;
        margin-top: 12px;
    }
    
    .auth-disclaimer {
        font-size: 0.75rem;
        margin-top: 12px;
    }
    
    .profile-dropdown {
        min-width: 140px;
        right: 8px !important;
    }
    
    .dropdown-item {
        padding: 8px 12px;
        font-size: 0.85rem;
    }
    
    .dropdown-item i {
        font-size: 14px;
    }
}

/* Touch-friendly improvements */
@media (hover: none) and (pointer: coarse) {
    .auth-button,
    .social-btn,
    .submit-btn,
    .character-card,
    .nav-dot,
    .dropdown-item {
        min-height: 44px;
        min-width: 44px;
    }
    
    .auth-button {
        padding: 10px 16px;
    }
    
    .social-btn {
        padding: 12px 16px;
    }
    
    .character-card:hover {
        transform: none;
    }
    
    .character-card:active {
        transform: scale(0.98);
    }
    
    .nav-dot {
        width: 16px;
        height: 16px;
    }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .modal-overlay {
        padding-top: 20px;
    }
    
    .banner-carousel {
        height: 180px;
    }
    
    .banner-video-side {
        height: 120px;
    }
    
    .banner-split-title {
        font-size: 1.3rem;
    }
    
    .character-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 480px) and (orientation: landscape) {
    .character-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

:root {
    /* New color scheme */
    --bg-color: #0E0E10;  /* 40% 黑灰 */
    --container-bg: #151517;
    --accent-purple: #A259FF;  /* 20% 紫 */
    --text-silver: #C4C4C4;  /* 10% 银灰 */
    --accent-blue: #00CFFF;  /* 10% 蓝 */
    --accent-red: #E63946;  /* 10% 红 */
    --accent-pink: #F8A3FF;  /* 5% 粉紫 */
    
    /* Secondary colors */
    --sidebar-bg: #151517;
    --border-color: #2A2A2D;
    --glass-bg: rgba(35, 35, 40, 0.65);
    --glass-border: rgba(60, 60, 70, 0.4);
    --glass-highlight: rgba(255, 255, 255, 0.07);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.4);
    --card-glow: 0 0 20px rgba(162, 89, 255, 0.15);
}

body {
    background-color: var(--bg-color);
    color: var(--text-silver);
    min-height: 100vh;
    line-height: 1.6;
    background-image: 
        radial-gradient(circle at 20% 30%, rgba(162, 89, 255, 0.15) 0%, transparent 30%),
        radial-gradient(circle at 80% 60%, rgba(0, 207, 255, 0.1) 0%, transparent 40%);
    background-attachment: fixed;
}

a {
    text-decoration: none;
    color: var(--text-silver);
    transition: all 0.3s ease;
}

a:hover {
    color: white;
}

button {
    cursor: pointer;
    border: none;
    outline: none;
    transition: all 0.3s ease;
}

ul {
    list-style: none;
}

/* Layout Structure */
.page-container {
    display: flex;
    min-height: calc(100vh - 60px);
    margin-top: 60px;
}

/* Header Styles */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background-color: var(--bg-color);
    border-bottom: 1px solid var(--border-color);
    z-index: 1001;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    padding: 0 20px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.menu-toggle {
    background: transparent;
    color: var(--text-silver);
    font-size: 24px;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.menu-toggle:hover {
    color: white;
}

.logo {
    display: flex;
    align-items: center;
    height: 60px;
}

.logo-img {
    height: 32px;
    width: auto;
    max-width: 140px;
    object-fit: contain;
    transition: all 0.3s ease;
    image-rendering: crisp-edges;
    image-rendering: -webkit-optimize-contrast;
    margin-top: 8px;
}

.logo-img:hover {
    transform: scale(1.05);
    filter: brightness(1.1);
}

/* Logo loading animation */
.logo-img:not(.loaded) {
    opacity: 0;
    animation: logoFadeIn 0.5s ease-in-out 0.2s forwards;
}

@keyframes logoFadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Fallback text logo styles */
.logo-text {
    background: linear-gradient(135deg, #A259FF 0%, #F8F8FF 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
    letter-spacing: -0.5px;
    font-size: 28px;
}

.logo-dot {
    color: var(--accent-red);
}

.header-nav {
    display: flex;
    gap: 30px;
}

.nav-item {
    padding: 8px 0;
    position: relative;
    color: var(--text-silver);
}

.nav-item.active {
    color: white;
}

.nav-item.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 3px;
    background-color: var(--accent-purple);
}

.nav-item i {
    margin-right: 6px;
}

/* Header Right Styles */
.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-left: auto;  /* Ensure it stays on the right */
}

.premium-button {
    background: linear-gradient(135deg, #A259FF, #F8A3FF);
    color: white;
    padding: 8px 16px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 20px rgba(162, 89, 255, 0.4);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.premium-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(162, 89, 255, 0.6);
}

.premium-button i {
    color: #FFD700;
    font-size: 16px;
}

.premium-button .discount {
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 6px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 700;
    margin-left: 4px;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 25px;
    transition: all 0.3s ease;
}

.user-profile:hover {
    background: rgba(162, 89, 255, 0.1);
}

.profile-img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--accent-purple);
}

.username-display {
    font-weight: 500;
    color: white;
}

/* Profile Dropdown Styles */
.profile-dropdown {
    position: fixed;
    background: rgba(26, 26, 26, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 12px;
    border: 1px solid rgba(162, 89, 255, 0.3);
    min-width: 180px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    pointer-events: none;
    padding: 8px 0;
}

.profile-dropdown.active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
}

.dropdown-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    gap: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #ffffff;
    font-size: 14px;
}

.dropdown-item:hover {
    background: rgba(162, 89, 255, 0.1);
}

.dropdown-item i {
    width: 16px;
    text-align: center;
    color: #cccccc;
}

.dropdown-item.logout-item {
    color: #ff6b6b;
}

.dropdown-item.logout-item:hover {
    background: rgba(255, 107, 107, 0.1);
}

.dropdown-item.logout-item i {
    color: #ff6b6b;
}

/* Sidebar Styles */
.sidebar {
    width: 240px;
    background-color: var(--sidebar-bg);
    border-right: 1px solid var(--border-color);
    padding: 20px 0;
    position: fixed;
    left: 0;
    top: 60px;
    height: calc(100vh - 60px);
    overflow-y: auto;
    transition: all 0.3s ease;
    z-index: 50;
    display: flex;
    flex-direction: column;
}

.sidebar.collapsed {
    width: 60px;
}

/* Hover-based expansion for collapsed sidebar */
.sidebar.collapsed:hover {
    width: 240px;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.3);
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 0 10px;
    flex: 1;
}

.sidebar-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 8px;
    transition: all 0.3s ease;
    white-space: nowrap;
    overflow: hidden;
    position: relative;
}

.sidebar-item:hover {
    background-color: rgba(162, 89, 255, 0.1);
    color: white;
}

.sidebar-item.active {
    background-color: rgba(162, 89, 255, 0.15);
    color: var(--accent-purple);
    font-weight: 600;
}

.sidebar-item i {
    font-size: 20px;
    min-width: 20px;
    width: 20px;
    text-align: center;
    display: inline-block;
}

/* Collapsed state - hide text immediately */
.sidebar.collapsed .sidebar-item span {
    opacity: 0;
    width: 0;
    overflow: hidden;
    transition: opacity 0.2s ease, width 0.2s ease;
}

/* Expanded state - show text with delay */
.sidebar:not(.collapsed) .sidebar-item span {
    opacity: 1;
    width: auto;
    transition: opacity 0.3s ease 0.1s, width 0.3s ease;
}

/* Hover expansion - show text with delay */
.sidebar.collapsed:hover .sidebar-item span {
    opacity: 1;
    width: auto;
    transition: opacity 0.3s ease 0.2s, width 0.3s ease 0.1s;
}

.sidebar-item.premium {
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-pink));
    color: white !important;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(162, 89, 255, 0.3);
}

.sidebar-item.premium:hover {
    transform: translateX(3px);
    box-shadow: 0 6px 20px rgba(162, 89, 255, 0.5);
}

.sidebar-item.premium i {
    color: #FFD700;
}

.sidebar-item.premium span {
    color: white !important;
}

.sidebar-footer {
    margin-top: auto;
    padding: 20px 10px;
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sidebar.collapsed .sidebar-footer {
    padding: 20px 5px;
}

.sidebar-footer-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
    color: var(--text-silver);
    font-size: 14px;
}

.sidebar-footer-item:hover {
    background-color: rgba(162, 89, 255, 0.1);
    color: white;
}

.sidebar-footer-item .flag-icon {
    width: 20px;
    height: 15px;
    border-radius: 2px;
}

.sidebar-footer-item i {
    font-size: 16px;
    min-width: 16px;
}

.sidebar.collapsed .sidebar-footer-item span {
    opacity: 0;
    width: 0;
    overflow: hidden;
    transition: opacity 0.3s ease, width 0.3s ease;
}

.sidebar:not(.collapsed) .sidebar-footer-item span {
    opacity: 1;
    width: auto;
    transition: opacity 0.3s ease 0.1s, width 0.3s ease;
}

.footer-legal {
    margin-top: 10px;
    padding: 10px 16px;
    font-size: 11px;
    text-align: left !important;
    color: rgba(196, 196, 196, 0.6);
}

.footer-legal a {
    color: rgba(196, 196, 196, 0.7);
    text-decoration: none;
}

.footer-legal a:hover {
    color: var(--accent-purple);
}

.sidebar.collapsed .footer-legal {
    display: none;
}

.language-selector {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.flag-icon {
    width: 20px;
    height: 15px;
}

.sidebar.collapsed .language-selector span,
.sidebar.collapsed .sidebar-footer-item span {
    opacity: 0;
    width: 0;
    overflow: hidden;
    transition: opacity 0.3s ease, width 0.3s ease;
}

.sidebar:not(.collapsed) .sidebar-footer-item span {
    opacity: 1;
    width: auto;
    transition: opacity 0.3s ease 0.1s, width 0.3s ease;
}

.sidebar-footer-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
}

.sidebar-footer-item i {
    font-size: 16px;
    min-width: 16px;
}

.footer-legal {
    margin-top: 10px;
    padding: 0 16px;
    font-size: 12px;
    opacity: 0.7;
    text-align: center;
}

.sidebar.collapsed .footer-legal {
    display: none;
}

.footer-legal a {
    color: var(--text-silver);
}

.dot-separator {
    margin: 0 5px;
}

/* Main Content */
.main-content {
    margin-left: 240px;
    flex: 1;
    padding: 20px;
    transition: all 0.3s ease;
}

.sidebar.collapsed ~ .main-content {
    margin-left: 80px;
}

/* Glass Panel Base Styles */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: var(--glass-shadow);
    position: relative;
    overflow: hidden;
}

.glass-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--glass-highlight);
}

/* Glass Card Styles */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    box-shadow: var(--glass-shadow);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--glass-highlight);
}

.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--card-glow), var(--glass-shadow);
}

.glass-card:hover::before {
    background: rgba(162, 89, 255, 0.3);
}

.title-section {
    padding: 20px 40px;
}

.page-title, .section-title {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 10px;
    text-align: center;
}

.title-highlight {
    color: var(--accent-purple);
}

.character-lobby {
    padding: 0 40px 40px;
}

.character-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.character-card {
    cursor: pointer;
    position: relative;
    aspect-ratio: 3/4;
    transition: all 0.3s ease;
    border-radius: 12px;
    overflow: hidden;
}

.character-card:hover {
    transform: translateY(-5px);
    box-shadow: 
        0 0 20px rgba(162, 89, 255, 0.6),
        0 0 40px rgba(162, 89, 255, 0.4),
        0 0 60px rgba(162, 89, 255, 0.2);
}

/* Animated border using box-shadow */
.character-card::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, 
        var(--accent-purple), 
        var(--accent-pink), 
        var(--accent-blue), 
        var(--accent-purple));
    background-size: 200% 200%;
    border-radius: 14px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
    animation: neonRotate 2s linear infinite;
}

@keyframes neonRotate {
    0% { background-position: 0% 0%; }
    25% { background-position: 100% 0%; }
    50% { background-position: 100% 100%; }
    75% { background-position: 0% 100%; }
    100% { background-position: 0% 0%; }
}

.character-card:hover::before {
    opacity: 1;
}



.character-image {
    width: 100% !important;
    height: 100% !important;
    overflow: hidden !important;
    position: relative !important;
    border-radius: 12px;
    background: transparent !important;
    z-index: 1 !important;
    opacity: 1 !important; /* Force container visible */
    visibility: visible !important; /* Force container visible */
    display: block !important; /* Force container visible */
}

/* Image containers now have transparent background by default - no loading animation needed */

/* Loading animation removed - images show immediately */

.character-image img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    transition: opacity 0.3s ease;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    z-index: 2 !important; /* Above background */
    opacity: 1 !important; /* Force visible by default */
    visibility: visible !important; /* Force visible */
    display: block !important; /* Force display */
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* Images are visible by default, no animation needed for loaded images */

.character-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 2;
    display: none; /* Hide video until loaded */
}

.character-video.loaded {
    display: block;
}

.character-video.playing {
    opacity: 1;
}

/* Image and video transitions handled by JavaScript */

.character-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 15px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
    pointer-events: none;
    z-index: 3;
}

.character-name {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 5px;
    color: white;
}

.character-age {
    opacity: 0.8;
    font-weight: 400;
    color: var(--accent-pink);
}

.character-bio {
    font-size: 14px;
    opacity: 0.8;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* Character Tags Styles */
.character-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
}

.character-tag {
    background: linear-gradient(135deg, rgba(162, 89, 255, 0.3), rgba(248, 163, 255, 0.3));
    border: 1px solid rgba(162, 89, 255, 0.5);
    border-radius: 12px;
    padding: 3px 8px;
    font-size: 11px;
    font-weight: 500;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.character-tag:hover {
    background: linear-gradient(135deg, rgba(162, 89, 255, 0.5), rgba(248, 163, 255, 0.5));
    border-color: rgba(162, 89, 255, 0.8);
    transform: scale(1.05);
}

/* Loading and Error States */
.loading-message {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 200px;
    font-size: 16px;
    color: var(--text-silver);
    background: var(--glass-bg);
    border-radius: 12px;
    grid-column: 1 / -1;
}

.error-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 200px;
    color: var(--text-silver);
    background: var(--glass-bg);
    border-radius: 12px;
    grid-column: 1 / -1;
    text-align: center;
}

.retry-btn {
    background: var(--accent-purple);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    margin-top: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.retry-btn:hover {
    background: var(--accent-pink);
    transform: translateY(-2px);
}

/* Premium Card Styles */
.premium-card {
    background: linear-gradient(135deg, #8631e6, #a259ff) !important;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    box-shadow: 0 0 30px rgba(162, 89, 255, 0.3) !important;
    border: 1px solid rgba(248, 163, 255, 0.3) !important;
}

.premium-card:hover {
    box-shadow: 0 0 40px rgba(162, 89, 255, 0.5) !important;
}

.premium-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    height: 100%;
}

.timer-container {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.timer-box {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.timer-value {
    font-size: 24px;
    font-weight: 700;
    color: white;
}

.timer-label {
    font-size: 12px;
    opacity: 0.8;
    color: white;
}

.discount-badge {
    margin-bottom: 20px;
}

.discount-text {
    font-size: 70px;
    font-weight: 700;
    line-height: 1;
    color: white;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

.percent {
    font-size: 24px;
    vertical-align: top;
}

.premium-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    color: white;
    letter-spacing: 1px;
}

.join-now-btn {
    background-color: white;
    color: var(--accent-purple);
    padding: 10px 24px;
    border-radius: 30px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.join-now-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.5);
    color: var(--accent-purple);
}

/* FAQ Section Styles */
.faq-section {
    padding: 20px 40px 60px;
}

.accordion {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 1200px;
    margin: 0 auto;
}

.accordion-item {
    overflow: hidden;
}

.accordion-header {
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: var(--glass-bg);
}

.accordion-header:hover {
    background-color: rgba(162, 89, 255, 0.1);
}

.accordion-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: white;
}

.accordion-header i {
    font-size: 16px;
    transition: transform 0.3s ease;
}

.accordion-content {
    padding: 0 20px;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
}

.accordion-content.active {
    max-height: 1000px;
    padding: 16px 20px;
}

.accordion-content p {
    margin-bottom: 12px;
}

.accordion-content p:last-child {
    margin-bottom: 0;
}

/* Bottom Footer Section - Removed as it's now in sidebar */

/* Footer styles moved to sidebar-footer */

.dot-separator {
    margin: 0 5px;
    color: rgba(196, 196, 196, 0.5);
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.8s ease-in-out;
}

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

/* Responsive Design */
@media (max-width: 1400px) {
    .character-grid {
        max-width: 1000px;
        gap: 16px;
    }
}

/* Tablet and Mobile Sidebar */
@media (max-width: 1200px) {
    .page-container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
        top: 0;
        order: 2;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        padding: 10px 0;
        transform: translateY(0);
        transition: transform 0.3s ease, opacity 0.3s ease;
    }
    
    .hero-banner {
        margin: 20px auto;
        padding: 0 10px;
    }
    
    .banner-carousel {
        width: 100%;
        max-width: calc(100vw - 40px);
        margin: 0 auto;
    }
    
    .sidebar.mobile-hidden {
        transform: translateY(-100%);
        opacity: 0;
        pointer-events: none;
        height: 0;
        overflow: hidden;
        padding: 0;
        margin: 0;
    }
    
    .sidebar-nav {
        flex-direction: row;
        overflow-x: auto;
        padding: 10px;
        gap: 5px;
        scrollbar-width: thin;
        scrollbar-color: var(--accent-purple) transparent;
    }
    
    .sidebar-nav::-webkit-scrollbar {
        height: 4px;
    }
    
    .sidebar-nav::-webkit-scrollbar-track {
        background: rgba(40, 40, 50, 0.3);
        border-radius: 2px;
    }
    
    .sidebar-nav::-webkit-scrollbar-thumb {
        background: var(--accent-purple);
        border-radius: 2px;
    }
    
    .sidebar-item {
        white-space: nowrap;
        flex-shrink: 0;
        min-width: auto;
        padding: 10px 16px;
        border-radius: 25px;
    }
    
    .sidebar-item.active {
        background-color: rgba(162, 89, 255, 0.15);
        color: var(--accent-purple);
        font-weight: 600;
    }
    
    .sidebar-footer {
        display: none;
    }
    
    .main-content {
        margin-left: 0;
        order: 1;
    }
    
    .sidebar.collapsed ~ .main-content {
        margin-left: 0;
    }

    .character-grid {
        grid-template-columns: repeat(4, 1fr);
        max-width: 900px;
        gap: 15px;
    }
}

@media (max-width: 992px) {
    .character-grid {
        grid-template-columns: repeat(3, 1fr);
        max-width: 700px;
        gap: 15px;
    }
}

@media (max-width: 768px) {
    .header-nav, .header-right {
        display: none;
    }

    .logo-img {
        height: 28px;
        max-width: 120px;
        margin-top: 6px;
    }

    .character-grid {
        grid-template-columns: repeat(2, 1fr);
        max-width: 500px;
        gap: 12px;
    }

    .title-section, .faq-section {
        padding: 20px;
    }

    .page-title, .section-title {
        font-size: 28px;
    }

    .character-lobby {
        padding: 0 20px 40px;
    }

    .accordion-header h3 {
        font-size: 16px;
    }
    
    .character-name {
        font-size: 20px;
    }
    
    .character-bio {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .character-grid {
        grid-template-columns: repeat(1, 1fr);
        max-width: 300px;
        gap: 15px;
    }
    
    .logo-img {
        height: 24px;
        max-width: 100px;
        margin-top: 6px;
    }
    
    .logo-text {
        font-size: 24px;
    }
    
    .page-title, .section-title {
        font-size: 24px;
    }
    
    .header-container {
        padding: 0 15px;
    }
    
    .bottom-footer-section {
        bottom: 15px;
        left: 15px;
        gap: 6px;
    }
    
    .bottom-footer-item {
        padding: 8px 12px;
        font-size: 12px;
    }
    
    .bottom-footer-item .flag-icon {
        width: 16px;
        height: 12px;
    }
    
    .bottom-footer-legal {
        padding: 6px 12px;
        font-size: 10px;
    }
    
    .faq-section {
        padding: 20px;
    }
}

/* Auth Messages */
.auth-message {
    border-radius: 8px;
    padding: 12px 16px;
    margin: 15px 0;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    animation: messageSlideIn 0.3s ease;
}

.auth-message i {
    font-size: 16px;
}

.auth-error {
    background: rgba(255, 107, 107, 0.1);
    border: 1px solid rgba(255, 107, 107, 0.3);
    color: #ff6b6b;
}

.auth-success {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #22c55e;
}

@keyframes messageSlideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Enhanced Auth Form Styles */
.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.auth-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 10px;
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-pink));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-subtitle {
    font-size: 1rem;
    color: var(--text-silver);
    opacity: 0.8;
}

.email-auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Checkbox and Remember Me styles */
.form-group input[type="checkbox"] {
    width: auto !important;
    margin: 0 !important;
    cursor: pointer;
}

.form-group label[for="rememberMe"] {
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
    margin: 0 !important;
    font-size: 0.9rem !important;
    color: var(--text-silver) !important;
    cursor: pointer !important;
    user-select: none;
}

/* Forgot password link */
.forgot-password {
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
    color: var(--accent-purple);
    text-decoration: none;
    font-size: 0.9rem;
    margin-top: 5px;
    float: right;
    transition: color 0.3s ease;
}

.forgot-password:hover {
    color: var(--accent-pink);
}

.form-label {
    display: block;
    font-size: 0.9rem;
    color: var(--text-silver);
    margin-bottom: 8px;
    font-weight: 500;
}

.form-input {
    width: 100%;
    padding: 14px 18px;
    background: rgba(60, 60, 70, 0.3);
    border: 1px solid rgba(80, 80, 90, 0.5);
    border-radius: 10px;
    color: white;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--accent-purple);
    background: rgba(60, 60, 70, 0.5);
    box-shadow: 0 0 20px rgba(162, 89, 255, 0.2);
}

.forgot-password {
    display: inline-block;
    margin-top: 8px;
    font-size: 0.85rem;
    color: var(--accent-purple);
    text-decoration: none;
    transition: color 0.3s ease;
}

.forgot-password:hover {
    color: var(--accent-pink);
}



.auth-link {
    color: var(--accent-purple);
    text-decoration: none;
}

.auth-link:hover {
    text-decoration: underline;
}

.primary-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 14px 24px;
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-pink));
    border: none;
    border-radius: 50px;
    color: white;
    font-weight: 600;
    font-size: 1.05rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(162, 89, 255, 0.6);
}

.primary-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.btn-text {
    font-weight: 600;
}

.auth-footer {
    text-align: center;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid rgba(80, 80, 90, 0.3);
}

.auth-footer p {
    color: var(--text-silver);
    font-size: 0.95rem;
}

.auth-link-primary {
    color: var(--accent-purple);
    text-decoration: none;
    font-weight: 600;
}

.auth-link-primary:hover {
    color: var(--accent-pink);
}

/* Social buttons with better spacing */
.social-auth {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 20px 0;
}

.social-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 20px;
    background: rgba(60, 60, 70, 0.3);
    border: 1px solid rgba(80, 80, 90, 0.5);
    border-radius: 10px;
    color: white;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.social-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(162, 89, 255, 0.4);
    background: rgba(162, 89, 255, 0.1);
    border-color: rgba(162, 89, 255, 0.6);
}

.social-btn span {
    font-weight: 500;
}

/* Twitter button specific styles */
.social-btn.twitter-btn {
    background: rgba(29, 161, 242, 0.1);
    border-color: rgba(29, 161, 242, 0.3);
}

.social-btn.twitter-btn:hover {
    background: rgba(29, 161, 242, 0.2);
    border-color: rgba(29, 161, 242, 0.6);
    box-shadow: 0 8px 25px rgba(29, 161, 242, 0.4);
}

.social-btn.twitter-btn i {
    color: #1DA1F2;
}

/* Google button specific styles */
.social-btn.google-btn {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.2);
}

.social-btn.google-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.4);
}

.social-btn.google-btn i {
    background: conic-gradient(from 45deg, #4285F4 0deg 90deg, #34A853 90deg 180deg, #FBBC05 180deg 270deg, #EA4335 270deg 360deg);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
} 
/* Skeleton Loading Styles */
.skeleton-card {
    pointer-events: none;
    user-select: none;
}

.skeleton-placeholder,
.skeleton-name,
.skeleton-tag,
.skeleton-line {
    background: linear-gradient(90deg, 
        rgba(255, 255, 255, 0.1) 25%, 
        rgba(255, 255, 255, 0.2) 50%, 
        rgba(255, 255, 255, 0.1) 75%
    );
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 4px;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.skeleton-image {
    position: relative;
    overflow: hidden;
}

.skeleton-placeholder {
    width: 100%;
    height: 100%;
    border-radius: 15px;
}

.skeleton-name {
    height: 24px;
    width: 70%;
    margin-bottom: 10px;
    border-radius: 6px;
}

.skeleton-tags {
    display: flex;
    gap: 6px;
    margin: 8px 0;
}

.skeleton-tag {
    height: 20px;
    width: 50px;
    border-radius: 12px;
}

.skeleton-tag:nth-child(2) {
    width: 60px;
}

.skeleton-tag:nth-child(3) {
    width: 45px;
}

.skeleton-bio {
    margin-top: 10px;
}

.skeleton-line {
    height: 14px;
    margin-bottom: 6px;
    border-radius: 3px;
}

.skeleton-line.short {
    width: 60%;
}

/* Chat Interface - New Design */
.chat-interface {
    width: 100%;
    height: calc(100vh - 60px);
    display: flex;
    position: relative;
    overflow: hidden;
    margin-top: 0;
    top: 60px;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
}

/* Ensure header buttons stay in correct position when in chat interface */
.chat-interface ~ .site-header .header-right,
body:has(.chat-interface:not([style*="display: none"])) .header-right {
    margin-left: auto !important;
    order: 3;
}

/* Character Background */
.chat-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
    filter: brightness(0.3);
    z-index: 1;
}

/* Chat Sidebar */
.chat-sidebar {
    width: 300px;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 2;
    position: relative;
    display: flex;
    flex-direction: column;
    transition: width 0.3s ease, transform 0.3s ease, margin-left 0.3s ease;
    overflow: hidden;
    margin-left: 240px; /* Default margin when main sidebar is expanded */
}

/* Adjust chat sidebar position based on main sidebar state */
.sidebar.collapsed ~ .main-content .chat-interface .chat-sidebar {
    margin-left: 60px; /* Reduced margin when main sidebar is collapsed */
}

/* Also adjust chat main area to account for sidebar changes */
.chat-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 2;
    margin-left: 0;
    transition: margin-left 0.3s ease;
}

.chat-sidebar.collapsed {
    width: 60px;
}

.chat-sidebar.collapsed:hover {
    width: 300px;
}

.chat-sidebar.collapsed .chat-sidebar-title,
.chat-sidebar.collapsed .chat-item {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease 0.1s;
}

.chat-sidebar.collapsed:hover .chat-sidebar-title,
.chat-sidebar.collapsed:hover .chat-item {
    opacity: 1;
    pointer-events: auto;
    transition: opacity 0.3s ease 0.2s;
}

.chat-sidebar.collapsed .chat-sidebar-header {
    padding: 20px 10px;
    text-align: center;
}

.chat-sidebar.collapsed:hover .chat-sidebar-header {
    padding: 20px;
    text-align: left;
    transition: padding 0.3s ease 0.1s;
}

/* Hover-based sidebar expansion - no toggle button needed */

.chat-sidebar-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.chat-sidebar-title {
    color: white;
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

.chat-list {
    flex: 1;
    overflow-y: auto;
    padding: 10px 0;
}

.chat-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    margin-bottom: 4px;
    position: relative;
    border-radius: 8px;
}

.chat-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.chat-item.active {
    background: rgba(138, 43, 226, 0.3);
    border-left: 3px solid #8A2BE2;
}

.chat-item-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 12px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    flex-shrink: 0;
}

.chat-item-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    height: 42px; /* Match avatar height */
    justify-content: center;
    overflow: hidden;
}

.chat-item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2px;
}

.chat-item-name {
    color: white;
    font-size: 14px;
    font-weight: 600;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}

.chat-item-time {
    color: rgba(255, 255, 255, 0.5);
    font-size: 10px;
    margin-left: 8px;
    flex-shrink: 0;
    white-space: nowrap;
}

.chat-item-preview {
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
    margin: 0;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-height: 14px;
}

/* Delete button that appears on hover */
.chat-item-delete {
    position: absolute;
    right: 8px;
    bottom: 6px;
    background: rgba(255, 89, 89, 0.8);
    border: none;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.2s ease;
    color: white;
    font-size: 10px;
    z-index: 10;
}

.chat-item:hover .chat-item-delete {
    opacity: 1;
    transform: scale(1);
}

.chat-item-delete:hover {
    background: rgba(255, 89, 89, 1);
    transform: scale(1.1);
}

.chat-item-delete i {
    font-size: 8px;
}

/* Main Chat Area */
.chat-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 2;
}

.chat-header {
    display: flex;
    align-items: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.chat-character-info {
    display: flex;
    align-items: center;
}

.character-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 15px;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.character-details h3 {
    color: white;
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.character-details span {
    color: #4CAF50;
    font-size: 12px;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: rgba(0, 0, 0, 0.3);
}

.message {
    display: flex;
    margin-bottom: 20px;
    animation: fadeInUp 0.3s ease;
}

.message.user {
    justify-content: flex-end;
}

.message.assistant {
    justify-content: flex-start;
}

.message-content {
    max-width: 70%;
    padding: 15px 20px;
    border-radius: 20px;
    position: relative;
    word-wrap: break-word;
    line-height: 1.5;
}

.message.user .message-content {
    background: linear-gradient(135deg, #ff6b9d, #c44569);
    color: white;
    border-bottom-right-radius: 5px;
}

.message.assistant .message-content {
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border-bottom-left-radius: 5px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.message-content .orange-text {
    color: #ff9500;
    font-style: italic;
}

/* Video Message Styles */
.message.video-message .message-content {
    padding: 0;
    background: none;
    border: none;
    backdrop-filter: none;
    max-width: min(60vw, 300px); /* Increased to match video wrapper width */
    width: 100%;
    margin-bottom: 10px; /* Add space between video and next message */
}

.video-wrapper {
    background: rgba(0, 0, 0, 0.8);
    border-radius: 15px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    position: relative;
    width: 100%;
    max-width: min(60vw, 300px); /* Increased width to accommodate proper aspect ratio */
    aspect-ratio: 3/4; /* Force wrapper to maintain 3:4 ratio */
}

.character-video {
    width: 100%;
    height: auto;
    aspect-ratio: 3/4; /* Maintain 3:4 aspect ratio */
    object-fit: contain; /* Changed from cover to contain to show full video */
    display: block !important;
    border-radius: 15px 15px 0 0;
    background: #000;
    visibility: visible !important;
    opacity: 1 !important;
    z-index: 10;
    min-height: 300px; /* Increased minimum height for proper 3:4 display */
    max-height: min(60vh, 400px); /* Increased max height to accommodate 3:4 ratio */
}

/* Video loading and error states */
.character-video:not([src]) {
    min-height: 200px;
    background: linear-gradient(90deg, #2a2a2d 25%, #3a3a3f 50%, #2a2a2d 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

.video-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.video-wrapper.loading::after {
    content: 'Loading video...';
    color: white;
    opacity: 1;
}

.video-wrapper.error::after {
    content: 'Video unavailable';
    color: rgba(255, 255, 255, 0.7);
    opacity: 1;
}

/* Custom video fullscreen styles */
.character-video:fullscreen {
    width: 70vw !important;
    height: 80vh !important;
    max-width: 500px !important;
    max-height: 90vh !important;
    object-fit: contain !important;
    background: rgba(0, 0, 0, 0.95) !important;
    margin: auto !important;
    border-radius: 0 !important;
}

.character-video:-webkit-full-screen {
    width: 70vw !important;
    height: 80vh !important;
    max-width: 500px !important;
    max-height: 90vh !important;
    object-fit: contain !important;
    background: rgba(0, 0, 0, 0.95) !important;
    margin: auto !important;
    border-radius: 0 !important;
}

.character-video:-moz-full-screen {
    width: 70vw !important;
    height: 80vh !important;
    max-width: 500px !important;
    max-height: 90vh !important;
    object-fit: contain !important;
    background: rgba(0, 0, 0, 0.95) !important;
    margin: auto !important;
    border-radius: 0 !important;
}

.character-video:-ms-fullscreen {
    width: 70vw !important;
    height: 80vh !important;
    max-width: 500px !important;
    max-height: 90vh !important;
    object-fit: contain !important;
    background: rgba(0, 0, 0, 0.95) !important;
    margin: auto !important;
    border-radius: 0 !important;
}

.video-info {
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.video-character-name {
    color: #ff6b9d;
    font-weight: 600;
    font-size: 14px;
}

.video-description {
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
    font-style: italic;
}

.chat-input-container {
    position: relative;
    padding: 20px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.typing-indicator {
    display: flex;
    align-items: center;
    padding: 8px 0;
    margin-bottom: 10px;
    background: none;
    backdrop-filter: none;
    border-radius: 0;
}

.typing-dots {
    display: flex;
    gap: 3px;
    margin-right: 8px;
}

.typing-dots span {
    width: 4px;
    height: 4px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    animation: typing 1.4s infinite ease-in-out;
}

.typing-dots span:nth-child(1) { animation-delay: -0.32s; }
.typing-dots span:nth-child(2) { animation-delay: -0.16s; }

.typing-text {
    color: rgba(255, 255, 255, 0.6);
    font-size: 13px;
    font-style: italic;
}

@keyframes typing {
    0%, 80%, 100% { transform: scale(0.8); opacity: 0.5; }
    40% { transform: scale(1); opacity: 1; }
}

.chat-input-area {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 25px;
    padding: 5px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.chat-input-area input {
    flex: 1;
    background: none;
    border: none;
    color: white;
    padding: 15px 20px;
    font-size: 16px;
    outline: none;
}

.chat-input-area input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.chat-input-area button {
    background: linear-gradient(135deg, #ff6b9d, #c44569);
    border: none;
    color: white;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.chat-input-area button:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(255, 107, 157, 0.4);
}

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

/* Mobile responsiveness for chat */
@media (max-width: 768px) {
    .chat-sidebar {
        width: 250px;
    }
    
    .chat-item {
        padding: 12px 15px;
    }
    
    .chat-item-avatar {
        width: 40px;
        height: 40px;
    }
    
    .message-content {
        max-width: 85%;
    }
    
    /* Mobile video adjustments */
    .video-wrapper {
        max-width: min(80vw, 280px); /* Larger on mobile for better visibility */
    }
    
    .message.video-message .message-content {
        max-width: min(80vw, 280px);
    }
    
    .character-video {
        min-height: 240px; /* Adjusted for mobile */
        max-height: min(50vh, 350px);
    }
}

/* Voice Features Styles */
.voice-input-btn {
    background: rgba(162, 89, 255, 0.2);
    border: 1px solid rgba(162, 89, 255, 0.4);
    color: #A259FF;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    margin-right: 8px;
}

.voice-input-btn:hover {
    background: rgba(162, 89, 255, 0.3);
    border-color: #A259FF;
    transform: scale(1.05);
}

.voice-input-btn.recording {
    background: rgba(255, 89, 89, 0.3);
    border-color: #FF5959;
    color: #FF5959;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { 
        opacity: 1; 
        transform: scale(1);
    }
    50% { 
        opacity: 0.7; 
        transform: scale(1.1);
    }
}

.play-voice-btn {
    background: rgba(162, 89, 255, 0.2);
    border: 1px solid rgba(162, 89, 255, 0.4);
    color: #A259FF;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    margin-left: 8px;
    font-size: 12px;
    vertical-align: middle;
}

.play-voice-btn:hover {
    background: rgba(162, 89, 255, 0.3);
    border-color: #A259FF;
    transform: scale(1.05);
}

.play-voice-btn.loading {
    color: #FFA500;
    border-color: rgba(255, 165, 0, 0.4);
    background: rgba(255, 165, 0, 0.2);
}

.play-voice-btn.playing {
    color: #4CAF50;
    border-color: rgba(76, 175, 80, 0.4);
    background: rgba(76, 175, 80, 0.2);
}

.play-voice-btn.error {
    color: #FF5959;
    border-color: rgba(255, 89, 89, 0.4);
    background: rgba(255, 89, 89, 0.2);
}

.play-voice-btn i.fa-spin {
    animation: fa-spin 1s infinite linear;
}

/* Ensure voice buttons fit well in chat input area */
.chat-input-area {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Mobile adjustments for voice buttons */
@media (max-width: 768px) {
    .voice-input-btn {
        width: 36px;
        height: 36px;
        margin-right: 6px;
    }
    
    .play-voice-btn {
        width: 28px;
        height: 28px;
        font-size: 10px;
        margin-left: 6px;
    }
}
