/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #0f0f0f;
    --bg-secondary: #1a1a1a;
    --bg-tertiary: #262626;
    --bg-quaternary: #333333;
    --text-primary: #ffffff;
    --text-secondary: #a3a3a3;
    --text-muted: #737373;
    --accent-primary: #3b82f6;
    --accent-secondary: #8b5cf6;
    --accent-gradient: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    --border-color: #262626;
    --border-hover: #404040;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-hover: 0 4px 12px rgba(0, 0, 0, 0.4);
    --success: #10b981;
    --error: #ef4444;
    --warning: #f59e0b;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: var(--bg-primary);
    min-height: 100vh;
    color: var(--text-primary);
    overflow-x: hidden;
}

/* Homepage Styles */
.homepage {
    min-height: 100vh;
    background: linear-gradient(135deg, #000000 0%, #0a0a0a 25%, #1a1a1a 50%, #000000 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    color: var(--text-primary);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow-x: hidden;
}

.homepage::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(120, 219, 255, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 60% 60%, rgba(255, 255, 255, 0.05) 0%, transparent 30%);
    animation: floatingOrbs 20s ease-in-out infinite;
    pointer-events: none;
}

.homepage::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        linear-gradient(45deg, transparent 30%, rgba(120, 119, 198, 0.03) 50%, transparent 70%),
        linear-gradient(-45deg, transparent 30%, rgba(255, 119, 198, 0.03) 50%, transparent 70%);
    animation: backgroundShimmer 25s ease-in-out infinite;
    pointer-events: none;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

@keyframes floatingOrbs {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    33% { transform: translateY(-20px) rotate(120deg); }
    66% { transform: translateY(10px) rotate(240deg); }
}

@keyframes backgroundShimmer {
    0%, 100% { transform: translateX(-100%) translateY(-100%); }
    25% { transform: translateX(100%) translateY(-50%); }
    50% { transform: translateX(50%) translateY(100%); }
    75% { transform: translateX(-50%) translateY(50%); }
}

/* Animated Particles */
.particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(120, 119, 198, 0.6);
    border-radius: 50%;
    animation: particleFloat 20s linear infinite;
}

.particle:nth-child(1) {
    left: 10%;
    animation-delay: 0s;
    animation-duration: 25s;
}

.particle:nth-child(2) {
    left: 20%;
    animation-delay: 2s;
    animation-duration: 30s;
    background: rgba(255, 119, 198, 0.6);
}

.particle:nth-child(3) {
    left: 30%;
    animation-delay: 4s;
    animation-duration: 22s;
    background: rgba(120, 219, 255, 0.6);
}

.particle:nth-child(4) {
    left: 40%;
    animation-delay: 6s;
    animation-duration: 28s;
}

.particle:nth-child(5) {
    left: 60%;
    animation-delay: 8s;
    animation-duration: 26s;
    background: rgba(255, 119, 198, 0.6);
}

.particle:nth-child(6) {
    left: 70%;
    animation-delay: 10s;
    animation-duration: 24s;
    background: rgba(120, 219, 255, 0.6);
}

.particle:nth-child(7) {
    left: 80%;
    animation-delay: 12s;
    animation-duration: 32s;
}

.particle:nth-child(8) {
    left: 90%;
    animation-delay: 14s;
    animation-duration: 20s;
    background: rgba(255, 119, 198, 0.6);
}

@keyframes particleFloat {
    0% {
        transform: translateY(100vh) translateX(0px) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100px) translateX(100px) rotate(360deg);
        opacity: 0;
    }
}

/* Header */
.header {
    background: rgba(15, 15, 35, 0.9);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 200;
    transition: all 0.3s ease;
}

.header:hover {
    background: rgba(15, 15, 35, 0.95);
    border-bottom-color: rgba(120, 119, 198, 0.3);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-image {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    object-fit: cover;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(120, 119, 198, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.logo:hover .logo-image {
    transform: scale(1.15) rotate(8deg);
    box-shadow: 0 8px 25px rgba(120, 119, 198, 0.5);
    border-color: rgba(120, 119, 198, 0.3);
}

.logo-text {
    font-size: 1.8rem;
    font-weight: 700;
    background: linear-gradient(135deg, #7877c6, #ff77c6, #78dbff);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: logoGlow 3s ease-in-out infinite;
    text-shadow: 0 0 20px rgba(120, 119, 198, 0.3);
}

@keyframes logoGlow {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.header-actions {
    display: flex;
    gap: 1rem;
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Hero Section */
.hero {
    padding: 6rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: 
        radial-gradient(circle, rgba(120, 119, 198, 0.15) 0%, transparent 70%),
        radial-gradient(circle at 30% 70%, rgba(255, 119, 198, 0.1) 0%, transparent 60%),
        radial-gradient(circle at 70% 30%, rgba(120, 219, 255, 0.1) 0%, transparent 60%);
    animation: heroPulse 8s ease-in-out infinite;
    pointer-events: none;
}

.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        linear-gradient(90deg, transparent 0%, rgba(120, 119, 198, 0.05) 50%, transparent 100%),
        linear-gradient(0deg, transparent 0%, rgba(255, 119, 198, 0.03) 50%, transparent 100%);
    animation: heroShimmer 12s ease-in-out infinite;
    pointer-events: none;
}

@keyframes heroPulse {
    0%, 100% { transform: scale(1) rotate(0deg); opacity: 0.3; }
    50% { transform: scale(1.1) rotate(180deg); opacity: 0.6; }
}

@keyframes heroShimmer {
    0%, 100% { transform: translateX(-100%) translateY(-100%); opacity: 0.3; }
    50% { transform: translateX(100%) translateY(100%); opacity: 0.6; }
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 10;
    animation: fadeInUp 1s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    line-height: 1.2;
    background: linear-gradient(135deg, #ffffff 0%, #7877c6 50%, #ff77c6 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: titleShimmer 4s ease-in-out infinite;
    text-shadow: 0 0 30px rgba(120, 119, 198, 0.3);
}

@keyframes titleShimmer {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.hero-description {
    font-size: 1.3rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 3rem;
    line-height: 1.6;
    animation: fadeInUp 1s ease-out 0.3s both;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.hero-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 1s ease-out 0.6s both;
}

/* Features Section */
.features {
    padding: 6rem 2rem;
    background: rgba(15, 15, 35, 0.3);
    position: relative;
}

.features::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 0%, rgba(120, 119, 198, 0.05) 50%, transparent 100%);
    animation: featuresShimmer 6s ease-in-out infinite;
    pointer-events: none;
}

@keyframes featuresShimmer {
    0%, 100% { transform: translateX(-100%); }
    50% { transform: translateX(100%); }
}

.features-content {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.section-title {
    font-size: 2.8rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 4rem;
    background: linear-gradient(135deg, #ffffff 0%, #7877c6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: fadeInUp 1s ease-out;
    text-shadow: 0 0 20px rgba(120, 119, 198, 0.3);
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    animation: fadeInUp 1s ease-out;
    animation-fill-mode: both;
}

.feature-item:nth-child(1) { animation-delay: 0.1s; }
.feature-item:nth-child(2) { animation-delay: 0.2s; }
.feature-item:nth-child(3) { animation-delay: 0.3s; }
.feature-item:nth-child(4) { animation-delay: 0.4s; }
.feature-item:nth-child(5) { animation-delay: 0.5s; }
.feature-item:nth-child(6) { animation-delay: 0.6s; }

.feature-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(120, 119, 198, 0.1), transparent);
    transition: left 0.5s ease;
}

.feature-item:hover::before {
    left: 100%;
}

.feature-item:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(120, 119, 198, 0.2);
    border-color: rgba(120, 119, 198, 0.5);
    background: rgba(255, 255, 255, 0.08);
}

.feature-icon {
    font-size: 3rem;
    flex-shrink: 0;
    filter: drop-shadow(0 0 10px rgba(120, 119, 198, 0.3));
    transition: all 0.3s ease;
}

.feature-item:hover .feature-icon {
    transform: scale(1.1) rotate(5deg);
    filter: drop-shadow(0 0 20px rgba(120, 119, 198, 0.6));
}

.feature-text h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.feature-text p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* How It Works Section */
.how-it-works {
    padding: 6rem 2rem;
    background: rgba(15, 15, 35, 0.5);
    position: relative;
}

.how-it-works::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 50%, rgba(255, 119, 198, 0.05) 0%, transparent 70%);
    animation: howItWorksPulse 10s ease-in-out infinite;
    pointer-events: none;
}

@keyframes howItWorksPulse {
    0%, 100% { transform: scale(1); opacity: 0.3; }
    50% { transform: scale(1.1); opacity: 0.6; }
}

.how-it-works-content {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.step {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-bottom: 2.5rem;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    animation: fadeInUp 1s ease-out;
    animation-fill-mode: both;
}

.step:nth-child(1) { animation-delay: 0.1s; }
.step:nth-child(2) { animation-delay: 0.2s; }
.step:nth-child(3) { animation-delay: 0.3s; }

.step::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 119, 198, 0.1), transparent);
    transition: left 0.5s ease;
}

.step:hover::before {
    left: 100%;
}

.step:hover {
    transform: translateX(15px) scale(1.02);
    border-color: rgba(255, 119, 198, 0.5);
    box-shadow: 0 15px 35px rgba(255, 119, 198, 0.2);
    background: rgba(255, 255, 255, 0.08);
}

.step-number {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #ff77c6, #7877c6);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    font-weight: 700;
    flex-shrink: 0;
    box-shadow: 0 4px 15px rgba(255, 119, 198, 0.3);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.step-number::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), transparent);
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.step:hover .step-number {
    transform: scale(1.1) rotate(360deg);
    box-shadow: 0 6px 20px rgba(255, 119, 198, 0.5);
}

.step:hover .step-number::before {
    opacity: 1;
}

.step-content h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.step-content p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* CTA Section */
.cta {
    padding: 6rem 2rem;
    background: linear-gradient(135deg, rgba(15, 15, 35, 0.8) 0%, rgba(26, 26, 46, 0.8) 100%);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 70%, rgba(120, 219, 255, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 70% 30%, rgba(120, 119, 198, 0.1) 0%, transparent 50%);
    animation: ctaGlow 12s ease-in-out infinite;
    pointer-events: none;
}

@keyframes ctaGlow {
    0%, 100% { transform: scale(1) rotate(0deg); opacity: 0.3; }
    50% { transform: scale(1.2) rotate(180deg); opacity: 0.6; }
}

.cta-content {
    max-width: 600px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.cta-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #ffffff 0%, #78dbff 50%, #ff77c6 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: ctaTitleShimmer 5s ease-in-out infinite;
    text-shadow: 0 0 30px rgba(120, 219, 255, 0.3);
}

@keyframes ctaTitleShimmer {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.cta-description {
    font-size: 1.3rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 3rem;
    line-height: 1.6;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.cta-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Footer */
.footer {
    background: rgba(15, 15, 35, 0.9);
    backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 3rem 2rem;
    position: relative;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(120, 119, 198, 0.5), transparent);
    animation: footerGlow 3s ease-in-out infinite;
}

@keyframes footerGlow {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 1;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.footer-logo .logo-text {
    background: linear-gradient(135deg, #7877c6, #ff77c6, #78dbff);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: logoGlow 3s ease-in-out infinite;
    font-size: 1.6rem;
    text-shadow: 0 0 15px rgba(120, 119, 198, 0.3);
}

.footer-logo .logo-image {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    object-fit: cover;
    transition: all 0.3s ease;
    box-shadow: 0 3px 12px rgba(120, 119, 198, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-logo:hover .logo-image {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 6px 20px rgba(120, 119, 198, 0.4);
    border-color: rgba(120, 119, 198, 0.3);
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-link {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    padding: 0.5rem 0;
}

.footer-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #7877c6, #ff77c6);
    transition: width 0.3s ease;
}

.footer-link:hover {
    color: #ffffff;
    transform: translateY(-2px);
}

.footer-link:hover::after {
    width: 100%;
}

/* Button Styles */
.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, #7877c6, #ff77c6);
    color: white;
    box-shadow: 0 4px 15px rgba(120, 119, 198, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 25px rgba(120, 119, 198, 0.4);
    background: linear-gradient(135deg, #8a89d4, #ff89d4);
}

.btn-outline {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(120, 119, 198, 0.5);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 25px rgba(120, 119, 198, 0.2);
}

.btn-large {
    padding: 1.2rem 2.5rem;
    font-size: 1.1rem;
    border-radius: 1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-content {
        padding: 0 1rem;
    }
    
    .header-actions {
        gap: 0.5rem;
    }
    
    .logo-image {
        width: 50px;
        height: 50px;
    }
    
    .logo-text {
        font-size: 1.5rem;
    }
    
    .footer-logo .logo-image {
        width: 40px;
        height: 40px;
    }
    
    .footer-logo .logo-text {
        font-size: 1.4rem;
    }
    
    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
    
    .hero {
        padding: 3rem 1rem;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-description {
        font-size: 1.1rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .btn-large {
        width: 100%;
        max-width: 300px;
    }
    
    .features, .how-it-works, .cta {
        padding: 3rem 1rem;
    }
    
    .feature-item {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .step {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .footer-links {
        justify-content: center;
    }
}

/* Modal Styles */
.modal {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(20px);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
}

.auth-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -1;
}

.floating-shapes {
    position: relative;
    width: 100%;
    height: 100%;
}

.shape {
    position: absolute;
    border-radius: 50%;
    background: linear-gradient(45deg, var(--accent-color), #ff6b6b, #4ecdc4);
    opacity: 0.1;
    animation: float 6s ease-in-out infinite;
}

.shape-1 {
    width: 80px;
    height: 80px;
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.shape-2 {
    width: 120px;
    height: 120px;
    top: 60%;
    right: 15%;
    animation-delay: 2s;
}

.shape-3 {
    width: 60px;
    height: 60px;
    top: 80%;
    left: 20%;
    animation-delay: 4s;
}

.shape-4 {
    width: 100px;
    height: 100px;
    top: 30%;
    right: 30%;
    animation-delay: 1s;
}

.shape-5 {
    width: 70px;
    height: 70px;
    top: 10%;
    right: 10%;
    animation-delay: 3s;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

.modal-content {
    background: var(--bg-secondary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4);
    width: 100%;
    max-width: 450px;
    margin: 20px;
    position: relative;
    overflow: hidden;
}

.modal-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-color), #ff6b6b, #4ecdc4);
}

.auth-container {
    text-align: center;
}

.auth-header {
    margin-bottom: 2rem;
    position: relative;
}

.back-button {
    position: fixed;
    top: 20px;
    left: 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    backdrop-filter: blur(10px);
    white-space: nowrap;
    z-index: 1000;
}

.back-button:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(120, 119, 198, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(120, 119, 198, 0.2);
}

.back-button i {
    font-size: 0.8rem;
}

.logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.logo-container .logo-image {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    object-fit: cover;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(120, 119, 198, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.1);
    background: none;
}

.logo-container .logo-image:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 8px 25px rgba(120, 119, 198, 0.5);
    border-color: rgba(120, 119, 198, 0.3);
}


.auth-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(45deg, var(--accent-color), #ff6b6b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
    letter-spacing: -0.01em;
}

.auth-subtitle {
    color: var(--text-secondary);
    margin: 0;
    font-size: 1.1rem;
}

.auth-tabs {
    display: flex;
    margin-bottom: 2rem;
    background: var(--bg-tertiary);
    border-radius: 12px;
    padding: 6px;
    position: relative;
    overflow: hidden;
}

.tab-btn {
    flex: 1;
    padding: 1rem;
    border: none;
    background: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    position: relative;
    z-index: 2;
    color: var(--text-secondary);
    border-radius: 8px;
    font-weight: 600;
}

.tab-btn:hover {
    color: var(--text-primary);
    transform: translateY(-2px);
}

.tab-btn.active {
    color: white;
    background: linear-gradient(45deg, var(--accent-color), #ff6b6b);
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
}

.tab-icon {
    font-size: 1.2rem;
}

.tab-text {
    font-weight: 600;
}

.tab-indicator {
    position: absolute;
    top: 6px;
    left: 6px;
    height: calc(100% - 12px);
    width: calc(50% - 6px);
    background: linear-gradient(45deg, var(--accent-color), #ff6b6b);
    border-radius: 8px;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
}

.tab-btn[data-tab="signup"].active ~ .tab-indicator {
    transform: translateX(100%);
}

.auth-form {
    display: none;
    animation: fadeInUp 0.5s ease-out;
}

.auth-form.active {
    display: block;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

.input-container {
    position: relative;
}

.input-container input {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
}

.input-container input:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
    transform: translateY(-2px);
}

.input-container input:focus + .input-label,
.input-container input:not(:placeholder-shown) + .input-label {
    transform: translateY(-1.5rem) scale(0.85);
    color: var(--accent-color);
}

.input-label {
    position: absolute;
    left: 3rem;
    top: 1rem;
    color: var(--text-secondary);
    font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    background: var(--bg-tertiary);
    padding: 0 0.5rem;
}

.input-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
    color: var(--text-secondary);
    transition: color 0.3s ease;
}

.input-container input:focus ~ .input-icon {
    color: var(--accent-color);
}

.input-line {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-color), #ff6b6b);
    transition: width 0.3s ease;
}

.input-container input:focus ~ .input-line {
    width: 100%;
}

.password-toggle {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 1.2rem;
    transition: color 0.3s ease;
}

.password-toggle:hover {
    color: var(--accent-color);
}

.form-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.remember-me input[type="checkbox"] {
    width: auto;
    margin: 0;
}

.remember-me label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    cursor: pointer;
}

.forgot-password {
    color: var(--accent-color);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.forgot-password:hover {
    color: #ff6b6b;
}

.auth-btn {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(45deg, var(--accent-color), #ff6b6b);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.auth-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 123, 255, 0.3);
}

.auth-btn:active {
    transform: translateY(-1px);
}

.btn-loader {
    display: none;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.btn-success {
    display: none;
    color: white;
    font-size: 1.2rem;
}


.error-message {
    color: #e74c3c;
    font-size: 0.875rem;
    margin-top: 0.5rem;
    text-align: left;
    padding: 0.5rem;
    background: rgba(231, 76, 60, 0.1);
    border-radius: 8px;
    border-left: 3px solid #e74c3c;
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* App Container */
.app-container {
    display: flex;
    height: 100vh;
    background: var(--bg-primary);
    position: relative;
}

.app-container::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 80%, rgba(0, 212, 255, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 80% 20%, rgba(124, 58, 237, 0.1) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

/* Sidebar Styles */
.sidebar {
    width: 280px;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow);
    position: relative;
    z-index: 1;
}

.sidebar.collapsed {
    width: 0;
    min-width: 0;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-header {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    gap: 8px;
    align-items: center;
    background: var(--bg-tertiary);
}

.new-chat-btn {
    flex: 1;
    padding: 10px 16px;
    background: var(--accent-gradient);
    color: var(--text-primary);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    position: relative;
    overflow: hidden;
}

.new-chat-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.new-chat-btn:hover::before {
    left: 100%;
}

.new-chat-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}


.chat-history {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: var(--border-color) var(--bg-tertiary);
}

.chat-history::-webkit-scrollbar {
    width: 6px;
}

.chat-history::-webkit-scrollbar-track {
    background: var(--bg-tertiary);
    border-radius: 3px;
}

.chat-history::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
    transition: background 0.2s ease;
}

.chat-history::-webkit-scrollbar-thumb:hover {
    background: var(--accent-primary);
}

.chat-history h3 {
    margin-bottom: 12px;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.01em;
    text-transform: uppercase;
}

.chat-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.chat-item {
    padding: 10px 12px;
    background: var(--bg-tertiary);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.chat-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: var(--accent-gradient);
    transform: scaleY(0);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.chat-item:hover {
    background: var(--bg-quaternary);
    border-color: var(--border-hover);
    transform: translateX(4px);
}

.chat-item:hover .delete-chat-btn {
    opacity: 0.8;
}

.chat-item:hover::before {
    transform: scaleY(1);
}

.chat-item.active {
    background: var(--accent-gradient);
    color: var(--text-primary);
    border-color: var(--accent-primary);
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.3);
    transform: translateX(4px);
}

.chat-item.active::before {
    transform: scaleY(1);
    background: rgba(255, 255, 255, 0.3);
}

.chat-item-content {
    flex: 1;
    min-width: 0;
}

.chat-item-title {
    font-weight: 500;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 13px;
    line-height: 1.3;
}

.chat-item-date {
    font-size: 11px;
    opacity: 0.6;
    font-weight: 400;
}

.delete-chat-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 6px;
    border-radius: 4px;
    transition: all 0.2s ease;
    opacity: 0.3;
    font-size: 0.9rem;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    min-height: 24px;
}

.delete-chat-btn:hover {
    background: rgba(231, 76, 60, 0.2);
    color: #e74c3c;
    transform: scale(1.1);
    opacity: 1;
}


/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--bg-primary);
    position: relative;
    z-index: 1;
}

.main-header {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sidebar-toggle-main {
    padding: 10px;
    background: var(--bg-quaternary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-toggle-main:hover {
    background: var(--border-hover);
    color: var(--text-primary);
    border-color: var(--accent-primary);
    transform: scale(1.05);
}

.settings-btn {
    padding: 10px;
    background: var(--bg-quaternary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.settings-btn:hover {
    background: var(--border-hover);
    color: var(--text-primary);
    border-color: var(--accent-primary);
    transform: scale(1.05) rotate(90deg);
}

.chat-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    max-width: 100%;
}

.chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    gap: 20px;
    scrollbar-width: thin;
    scrollbar-color: var(--border-color) var(--bg-tertiary);
    background: linear-gradient(45deg, 
        #1a1a1a 0%, 
        #2d1b69 25%, 
        #1a1a1a 50%, 
        #0f3460 75%, 
        #1a1a1a 100%);
    background-size: 400% 400%;
    animation: brokenGradient 8s ease infinite;
    position: relative;
    max-width: 100%;
    box-sizing: border-box;
    min-width: 0;
}

.chat-messages::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        linear-gradient(90deg, transparent 0%, rgba(59, 130, 246, 0.1) 50%, transparent 100%),
        linear-gradient(0deg, transparent 0%, rgba(139, 92, 246, 0.1) 50%, transparent 100%);
    pointer-events: none;
    animation: brokenOverlay 6s ease-in-out infinite alternate;
}

@keyframes brokenGradient {
    0% { background-position: 0% 50%; }
    25% { background-position: 100% 50%; }
    50% { background-position: 100% 100%; }
    75% { background-position: 0% 100%; }
    100% { background-position: 0% 50%; }
}

@keyframes brokenOverlay {
    0% { opacity: 0.3; transform: translateX(-10px); }
    100% { opacity: 0.7; transform: translateX(10px); }
}

.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
    background: var(--bg-tertiary);
    border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
    transition: background 0.2s ease;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: var(--accent-primary);
}

.welcome-message {
    text-align: center;
    margin-top: 50px;
}

.welcome-message h2 {
    font-size: 1.8rem;
    font-weight: 600;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
    letter-spacing: -0.01em;
}

.welcome-message p {
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 400;
}

.message {
    display: flex;
    gap: 12px;
    animation: fadeInUp 0.5s cubic-bezier(0.4, 0, 0.2, 1), messageGlitch 3s ease-in-out infinite;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    margin: 8px 0;
    align-items: flex-end;
}

.message::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, 
        transparent 0%, 
        rgba(59, 130, 246, 0.05) 25%, 
        transparent 50%, 
        rgba(139, 92, 246, 0.05) 75%, 
        transparent 100%);
    pointer-events: none;
    animation: messageShimmer 4s ease-in-out infinite;
}

@keyframes messageGlitch {
    0%, 100% { transform: translateX(0) translateY(0); }
    25% { transform: translateX(-1px) translateY(1px); }
    50% { transform: translateX(1px) translateY(-1px); }
    75% { transform: translateX(-1px) translateY(-1px); }
}

@keyframes messageShimmer {
    0% { opacity: 0; transform: translateX(-100%); }
    50% { opacity: 1; transform: translateX(0%); }
    100% { opacity: 0; transform: translateX(100%); }
}

.message.user {
    align-self: flex-end;
    flex-direction: row-reverse;
    margin-left: 20%;
    margin-right: 0;
    max-width: 80%;
}

.message.assistant {
    align-self: flex-start;
    margin-right: 20%;
    margin-left: 0;
    max-width: 80%;
}

.message.assistant.with-code {
    margin-right: 0;
    max-width: 100%;
    width: 100%;
}

.message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: var(--text-primary);
    flex-shrink: 0;
    font-size: 14px;
    border: 1px solid var(--border-color);
}

.message.user .message-avatar {
    background: var(--accent-gradient);
    border-color: var(--accent-primary);
}

.message.assistant .message-avatar {
    background: var(--success);
    border-color: var(--success);
    padding: 2px;
}

/* AI Logo styling */
.ai-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 50%;
    background: transparent;
    transition: transform 0.3s ease;
}

.ai-logo:hover {
    transform: scale(1.1);
}

/* Responsive logo adjustments */
@media (max-width: 768px) {
    .ai-logo {
        width: 90%;
        height: 90%;
    }
}

@media (max-width: 480px) {
    .ai-logo {
        width: 85%;
        height: 85%;
    }
}

.message-content {
    background: var(--bg-secondary);
    padding: 12px 16px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    word-wrap: break-word;
    line-height: 1.5;
    border: 1px solid var(--border-color);
    font-size: 14px;
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    max-width: 100%;
    box-sizing: border-box;
}

.message-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(59, 130, 246, 0.1) 50%, 
        transparent 100%);
    animation: contentScan 2s ease-in-out infinite;
}

@keyframes contentScan {
    0% { left: -100%; }
    100% { left: 100%; }
}

@keyframes randomGlitch {
    0% { transform: translateX(0) translateY(0) rotate(0deg); }
    10% { transform: translateX(-2px) translateY(1px) rotate(-0.5deg); }
    20% { transform: translateX(2px) translateY(-1px) rotate(0.5deg); }
    30% { transform: translateX(-1px) translateY(2px) rotate(-0.3deg); }
    40% { transform: translateX(1px) translateY(-2px) rotate(0.3deg); }
    50% { transform: translateX(-2px) translateY(1px) rotate(-0.5deg); }
    60% { transform: translateX(2px) translateY(-1px) rotate(0.5deg); }
    70% { transform: translateX(-1px) translateY(2px) rotate(-0.3deg); }
    80% { transform: translateX(1px) translateY(-2px) rotate(0.3deg); }
    90% { transform: translateX(-2px) translateY(1px) rotate(-0.5deg); }
    100% { transform: translateX(0) translateY(0) rotate(0deg); }
}

/* Code Display Modal */
.code-display-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 3000;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease;
}

.code-display-content {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: var(--shadow-hover);
    animation: slideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.code-display-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-tertiary);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.code-display-title {
    color: var(--text-primary);
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.code-display-title i {
    color: var(--accent-primary);
}

.code-display-close {
    padding: 8px;
    background: var(--bg-quaternary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.code-display-close:hover {
    background: var(--error);
    color: var(--text-primary);
    border-color: var(--error);
    transform: scale(1.05);
}

.code-display-body {
    padding: 0;
    max-height: 60vh;
    overflow-y: auto;
}

.code-display-code {
    background: #1e1e1e;
    color: #d4d4d4;
    padding: 24px;
    margin: 0;
    font-family: 'Courier New', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 14px;
    line-height: 1.6;
    overflow-x: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
    border: none;
    border-radius: 0;
}

.code-display-actions {
    padding: 20px 24px;
    border-top: 1px solid var(--border-color);
    background: var(--bg-tertiary);
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.copy-code-btn {
    padding: 12px 20px;
    background: var(--accent-gradient);
    color: var(--text-primary);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.copy-code-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

.copy-code-btn:active {
    transform: translateY(0);
}

.copy-code-btn.copied {
    background: var(--success);
    animation: pulse 0.6s ease;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Old code-preview styles removed - using new .code-block styles instead */

/* Message text styling for code responses */
.message.with-code .message-text {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 12px;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-primary);
}

/* New ChatGPT-style code block */
.code-block {
    background: #1e1e1e;
    border-radius: 8px;
    margin: 12px 0;
    overflow: hidden;
    border: 2px solid #00ff00; /* Green border to make it obvious */
    box-shadow: 0 4px 12px rgba(0, 255, 0, 0.3); /* Green glow */
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
    min-width: 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.code-block-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: #2d2d2d;
    border-bottom: 2px solid #00ff00; /* Green border */
}

.code-block-title {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
}

.code-icon {
    font-size: 16px;
}

.code-block-copy {
    background: transparent;
    border: 1px solid #555;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    padding: 6px 12px;
    border-radius: 6px;
}

.code-block-copy:hover {
    color: var(--accent-primary);
    background: var(--bg-tertiary);
    border-color: var(--accent-primary);
}

.code-block-copy .copy-icon {
    font-size: 14px;
}

.code-block-copy.copied {
    color: var(--success);
    background: rgba(16, 185, 129, 0.1);
    border-color: var(--success);
}

.code-block-copy.copied .copy-icon {
    color: var(--success);
}

.code-block-content {
    padding: 0;
    background: #1e1e1e;
    max-width: 100%;
}

.code-block-content pre {
    margin: 0;
    padding: 16px;
    font-family: 'Courier New', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 13px;
    line-height: 1.5;
    color: #d4d4d4;
    background: transparent;
    white-space: pre-wrap;
    max-width: 100%;
    word-wrap: break-word;
    word-break: break-all;
    overflow-wrap: anywhere;
    min-width: 0;
}

.code-block-content code {
    background: transparent;
    padding: 0;
    border-radius: 0;
    font-family: inherit;
    font-size: inherit;
    color: inherit;
}

/* Responsive design for code blocks */
@media (max-width: 768px) {
    .code-block {
        margin: 8px 0;
        border-radius: 6px;
    }
    
    .code-block-header {
        padding: 8px 12px;
        flex-direction: column;
        gap: 8px;
        align-items: flex-start;
    }
    
    .code-block-title {
        font-size: 12px;
    }
    
    .code-block-copy {
        font-size: 11px;
        padding: 4px 8px;
        align-self: flex-end;
    }
    
    .code-block-content pre {
        padding: 12px;
        font-size: 11px;
        line-height: 1.4;
    }
}

@media (max-width: 480px) {
    .code-block-content pre {
        padding: 8px;
        font-size: 10px;
        line-height: 1.3;
    }
    
    .code-block-header {
        padding: 6px 8px;
    }
    
    .code-block-copy {
        font-size: 10px;
        padding: 3px 6px;
    }
}

/* Specific overflow prevention for code-related elements only */
.message, .message-content, .code-block, .code-block-content, .code-block-content pre {
    max-width: 100%;
    box-sizing: border-box;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Only add horizontal scroll to code content when needed */
.code-block-content {
    overflow-x: auto;
}

.code-block-content pre {
    overflow-x: auto;
}

/* Remaining old code-preview styles removed */

/* Removed old code-full-content styles */

/* Removed old code-full-content and slideDown animation styles */

.message-content:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.message.user .message-content {
    background: var(--accent-gradient);
    color: var(--text-primary);
    border-color: var(--accent-primary);
    border-radius: 20px 20px 8px 20px;
    margin: 0;
    padding: 12px 16px;
    max-width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

.message.assistant .message-content {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border-color: var(--border-color);
    border-radius: 20px 20px 20px 8px;
    margin: 0;
    padding: 12px 16px;
    max-width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

/* Inline code styling */
.inline-code {
    background: var(--bg-tertiary);
    color: var(--accent-primary);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Fira Code', 'Monaco', 'Consolas', monospace;
    font-size: 0.9em;
    border: 1px solid var(--border-color);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    display: inline-block;
    margin: 0 1px;
    transition: all 0.2s ease;
}

.inline-code:hover {
    background: var(--accent-primary);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    cursor: pointer;
}

.inline-code.copied {
    background: var(--success);
    color: white;
    animation: inlineCodePulse 0.6s ease;
}

@keyframes inlineCodePulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.inline-code .copy-icon {
    opacity: 0;
    margin-left: 4px;
    font-size: 0.8em;
    transition: opacity 0.2s ease;
}

.inline-code:hover .copy-icon {
    opacity: 0.7;
}

.inline-code.copied .copy-icon {
    opacity: 1;
}

/* Chat Input */
.chat-input-container {
    padding: 16px;
    border-top: 1px solid var(--border-color);
    background: var(--bg-secondary);
    position: relative;
}

.chat-input-wrapper {
    display: flex;
    gap: 12px;
    align-items: flex-end;
    max-width: 800px;
    margin: 0 auto;
}

.input-buttons {
    display: flex;
    align-items: center;
    gap: 8px;
}

#chatInput {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    font-size: 14px;
    resize: none;
    max-height: 120px;
    min-height: 40px;
    font-family: inherit;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--bg-tertiary);
    color: var(--text-primary);
    font-weight: 400;
    line-height: 1.4;
}

#chatInput:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
    background: var(--bg-quaternary);
    transform: translateY(-1px);
}

#chatInput::placeholder {
    color: var(--text-muted);
}

.send-btn {
    width: 40px;
    height: 40px;
    background: var(--accent-gradient);
    color: var(--text-primary);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
    font-size: 16px;
    position: relative;
    overflow: hidden;
}

.send-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.send-btn:hover::before {
    opacity: 1;
}

.send-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

.menu-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--text-secondary);
    position: relative;
}

.menu-btn:hover {
    transform: scale(1.1);
    background: var(--accent-gradient);
    color: white;
    box-shadow: 0 8px 25px rgba(120, 119, 198, 0.4);
}


.version-dropdown {
    position: absolute;
    bottom: 100%;
    right: 0;
    margin-bottom: 8px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    padding: 8px;
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
}

.version-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.version-option {
    padding: 12px 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.version-option:hover {
    background: var(--accent-gradient);
    border-color: rgba(120, 119, 198, 0.3);
    transform: translateX(4px);
}

.version-title {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
    margin-bottom: 2px;
}

.version-desc {
    font-size: 0.8rem;
    color: var(--text-secondary);
    opacity: 0.8;
}

.version-option:hover .version-title,
.version-option:hover .version-desc {
    color: white;
}

.version-option.selected {
    background: var(--accent-gradient);
    border-color: rgba(120, 119, 198, 0.3);
}

.version-option.selected .version-title,
.version-option.selected .version-desc {
    color: white;
}

.send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideOutRight {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

/* Loading Animation */
.typing-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 12px 16px;
    background: var(--bg-secondary);
    border-radius: 12px;
    max-width: 60px;
    border: 1px solid var(--border-color);
}

.typing-dot {
    width: 6px;
    height: 6px;
    background: var(--accent-primary);
    border-radius: 50%;
    animation: typing 1.4s infinite cubic-bezier(0.4, 0, 0.2, 1);
}

.typing-dot:nth-child(1) { animation-delay: -0.32s; }
.typing-dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes typing {
    0%, 80%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    40% {
        transform: scale(1.1);
        opacity: 1;
    }
}


/* Responsive Design */
@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        z-index: 1000;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        background: var(--bg-secondary);
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    }
    
    .sidebar:not(.collapsed) {
        transform: translateX(0);
    }
    
    .main-content {
        width: 100%;
    }
    
    .sidebar-toggle-main {
        display: block;
        background: var(--accent-primary);
        color: white;
        border: none;
        border-radius: 8px;
        padding: 0.75rem;
        font-size: 1.2rem;
        box-shadow: 0 2px 8px rgba(120, 119, 198, 0.3);
        transition: all 0.3s ease;
    }
    
    .sidebar-toggle-main:hover {
        background: var(--accent-hover);
        transform: scale(1.05);
    }
    
    
    .message {
        max-width: 90%;
    }
    
    .modal-content {
        margin: 10px;
        padding: 30px 20px;
    }
    
    .auth-header h1 {
        font-size: 2rem;
    }
    
    .back-button {
        position: fixed;
        top: 15px;
        left: 15px;
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
        z-index: 1000;
    }
    
    .back-button span {
        display: inline;
    }
}

/* Settings Modal */
.settings-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 2000;
    justify-content: center;
    align-items: center;
}

.settings-modal-content {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: var(--shadow-hover);
    animation: slideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.settings-header {
    padding: 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-tertiary);
    border-radius: 16px 16px 0 0;
}

.settings-header h2 {
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
}

.close-settings-btn {
    padding: 8px;
    background: var(--bg-quaternary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-settings-btn:hover {
    background: var(--error);
    color: var(--text-primary);
    border-color: var(--error);
    transform: scale(1.05);
}

.settings-body {
    padding: 24px;
}

.settings-section {
    margin-bottom: 32px;
}

.settings-section:last-child {
    margin-bottom: 0;
}

.settings-section h3 {
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.8;
}

.settings-option {
    margin-bottom: 12px;
}

.settings-option:last-child {
    margin-bottom: 0;
}

.settings-option-btn {
    width: 100%;
    padding: 16px 20px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    color: var(--text-primary);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    font-weight: 500;
    text-align: left;
}

.settings-option-btn:hover {
    background: var(--bg-quaternary);
    border-color: var(--border-hover);
    transform: translateX(4px);
}

.settings-option-btn i {
    width: 20px;
    text-align: center;
    opacity: 0.7;
}

.settings-option-btn.logout-option {
    color: var(--error);
    border-color: rgba(239, 68, 68, 0.3);
}

.settings-option-btn.logout-option:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: var(--error);
    color: var(--error);
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-tertiary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
    transition: background 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-primary);
}

/* Enhanced Version Dropdown Styles */
.version-option {
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 8px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.version-option::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.version-option:hover::before {
    left: 100%;
}

.version-option:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    border-color: var(--accent-primary);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.08));
}

.version-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.version-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.version-badge {
    font-size: 24px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.version-desc {
    font-size: 14px;
    color: var(--accent-primary);
    font-weight: 600;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.version-features {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.feature-tag {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.feature-tag:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Special styling for each version */
.version-option[data-version="1.0"] {
    border-left: 4px solid #00d4ff;
}

.version-option[data-version="1.0"]:hover {
    box-shadow: 0 8px 25px rgba(0, 212, 255, 0.3);
}

.version-option[data-version="2.0"] {
    border-left: 4px solid #ff6b35;
}

.version-option[data-version="2.0"]:hover {
    box-shadow: 0 8px 25px rgba(255, 107, 53, 0.3);
}

.version-option[data-version="3.0"] {
    border-left: 4px solid #9d4edd;
}

.version-option[data-version="3.0"]:hover {
    box-shadow: 0 8px 25px rgba(157, 78, 221, 0.3);
}

/* Active version styling */
.version-option.active {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    border-color: var(--accent-primary);
    transform: scale(1.02);
}

.version-option.active .version-title {
    color: white;
}

.version-option.active .version-desc {
    color: rgba(255, 255, 255, 0.9);
}

.version-option.active .feature-tag {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}
