* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 25%, #16213e 50%, #0f3460 75%, #533483 100%);
    min-height: 100vh;
    color: #ffffff;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(120, 219, 255, 0.2) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 40px;
}

.header-content {
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(20px);
    border: 2px solid rgba(120, 219, 255, 0.3);
    border-radius: 24px;
    padding: 40px;
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.5),
        0 0 30px rgba(120, 219, 255, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    animation: slideDown 0.8s ease-out;
    position: relative;
}

.header-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(120, 219, 255, 0.1) 0%, rgba(255, 119, 198, 0.1) 100%);
    border-radius: 24px;
    pointer-events: none;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 16px;
}

.logo-icon {
    font-size: 48px;
    animation: float 3s ease-in-out infinite;
    filter: drop-shadow(0 0 20px rgba(120, 213, 255, 0.5));
    transition: all 0.3s ease;
}

.logo-icon:hover {
    transform: scale(1.1) rotate(5deg);
    filter: drop-shadow(0 0 30px rgba(120, 213, 255, 0.8));
}

.logo h1 {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #78d5ff 0%, #ff77d9 50%, #ffb347 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 30px rgba(120, 213, 255, 0.5);
    animation: textGlow 3s ease-in-out infinite alternate;
}

.subtitle {
    font-size: 1.1rem;
    color: #666;
    opacity: 0.8;
}

/* Main Content */
.main-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    align-items: start;
}

/* Chat Container */
.chat-container {
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(20px);
    border: 2px solid rgba(120, 219, 255, 0.2);
    border-radius: 24px;
    padding: 30px;
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.4),
        0 0 30px rgba(120, 219, 255, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    animation: slideUp 0.8s ease-out;
    position: relative;
}

.chat-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(120, 219, 255, 0.05) 0%, rgba(255, 119, 198, 0.05) 100%);
    border-radius: 24px;
    pointer-events: none;
}

.messages {
    max-height: 500px;
    overflow-y: auto;
    margin-bottom: 30px;
    padding-right: 10px;
}

.messages::-webkit-scrollbar {
    width: 6px;
}

.messages::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.messages::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 3px;
}

.message {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
    animation: fadeInUp 0.5s ease-out;
}

.message-avatar {
    flex-shrink: 0;
}

.ai-avatar, .user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    color: white;
}

.ai-avatar {
    background: linear-gradient(135deg, #78d5ff, #4facfe);
    box-shadow: 0 0 20px rgba(120, 213, 255, 0.5);
    border: 2px solid rgba(120, 213, 255, 0.3);
}

.user-avatar {
    background: linear-gradient(135deg, #ff77d9, #ff6b6b);
    box-shadow: 0 0 20px rgba(255, 119, 217, 0.5);
    border: 2px solid rgba(255, 119, 217, 0.3);
}

.message-content {
    flex: 1;
    background: rgba(255, 255, 255, 0.95);
    padding: 16px 20px;
    border-radius: 18px;
    line-height: 1.6;
    color: #2c3e50;
    border: 1px solid rgba(120, 219, 255, 0.2);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.ai-message .message-content {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(240, 248, 255, 0.95));
    color: #2c3e50;
    border: 1px solid rgba(120, 219, 255, 0.3);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1), 0 0 20px rgba(120, 219, 255, 0.1);
}

.user-message {
    flex-direction: row-reverse;
}

.user-message .message-content {
    background: linear-gradient(135deg, #ff77d9, #ff6b6b);
    color: white;
    box-shadow: 0 8px 25px rgba(255, 119, 217, 0.3), 0 0 20px rgba(255, 119, 217, 0.2);
    border: 1px solid rgba(255, 119, 217, 0.3);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.message-content ul {
    margin: 12px 0;
    padding-left: 20px;
}

.message-content li {
    margin-bottom: 8px;
}

/* Input Container */
.input-container {
    position: relative;
}

.input-wrapper {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 25px;
    padding: 4px;
    box-shadow: 
        inset 0 2px 8px rgba(0, 0, 0, 0.1),
        0 0 20px rgba(120, 219, 255, 0.1);
    transition: all 0.3s ease;
    border: 1px solid rgba(120, 219, 255, 0.2);
}

.input-wrapper:focus-within {
    box-shadow: 
        inset 0 2px 8px rgba(0, 0, 0, 0.1), 
        0 0 0 3px rgba(120, 219, 255, 0.3),
        0 0 30px rgba(120, 219, 255, 0.2);
    border-color: rgba(120, 219, 255, 0.5);
    background: rgba(255, 255, 255, 1);
}

#messageInput {
    flex: 1;
    border: none;
    background: transparent;
    padding: 16px 20px;
    font-size: 16px;
    outline: none;
    border-radius: 25px;
    color: #2c3e50;
}

#messageInput::placeholder {
    color: #7f8c8d;
    opacity: 0.8;
}

.send-button {
    width: 44px;
    height: 44px;
    border: none;
    background: linear-gradient(135deg, #78d5ff, #4facfe);
    color: white;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid rgba(120, 213, 255, 0.3);
    box-shadow: 0 0 20px rgba(120, 213, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.send-button:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(120, 213, 255, 0.5);
    border-color: rgba(120, 213, 255, 0.6);
}

.send-button:active {
    transform: scale(0.95);
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.feature-card {
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(20px);
    border: 2px solid rgba(120, 219, 255, 0.2);
    border-radius: 20px;
    padding: 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 
        0 10px 30px rgba(0, 0, 0, 0.3),
        0 0 20px rgba(120, 219, 255, 0.1);
    animation: slideRight 0.8s ease-out;
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(120, 219, 255, 0.05) 0%, rgba(255, 119, 198, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.feature-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.4),
        0 0 30px rgba(120, 219, 255, 0.3);
    border-color: rgba(120, 219, 255, 0.5);
    animation: neonPulse 2s infinite;
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 16px;
    animation: pulse 2s infinite;
}

.feature-card h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #78d5ff, #ff77d9);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 20px rgba(120, 213, 255, 0.3);
}

.feature-card p {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Animations */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

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

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes textGlow {
    0% {
        text-shadow: 0 0 30px rgba(120, 213, 255, 0.5);
    }
    100% {
        text-shadow: 0 0 50px rgba(120, 213, 255, 0.8), 0 0 70px rgba(120, 213, 255, 0.4);
    }
}

@keyframes neonPulse {
    0% {
        box-shadow: 0 0 20px rgba(120, 213, 255, 0.3);
    }
    50% {
        box-shadow: 0 0 30px rgba(120, 213, 255, 0.6), 0 0 40px rgba(120, 213, 255, 0.3);
    }
    100% {
        box-shadow: 0 0 20px rgba(120, 213, 255, 0.3);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .main-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .header-content {
        padding: 30px 20px;
    }
    
    .logo h1 {
        font-size: 2rem;
    }
    
    .chat-container {
        padding: 20px;
    }
    
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .container {
        padding: 15px;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .logo {
        flex-direction: column;
        gap: 8px;
    }
    
    .logo h1 {
        font-size: 1.8rem;
    }
}