/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #000000;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
    margin: 0;
    padding: 0;
}

/* Animated Background */
body::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 20% 50%, rgba(120, 70, 255, 0.15) 0%, transparent 50%),
                radial-gradient(circle at 80% 80%, rgba(255, 70, 150, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 40% 20%, rgba(70, 150, 255, 0.1) 0%, transparent 50%);
    animation: backgroundFloat 20s ease-in-out infinite;
}

@keyframes backgroundFloat {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(-10px, -10px) rotate(1deg); }
    66% { transform: translate(10px, -5px) rotate(-1deg); }
}

/* Floating Particles */
.particles {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 3px;
    height: 3px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    animation: particleFloat 15s infinite linear;
}

@keyframes particleFloat {
    0% {
        transform: translateY(100vh) translateX(0);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100vh) translateX(100px);
        opacity: 0;
    }
}

/* Chat Container */
.chat-container {
    width: 450px;
    height: 650px;
    background: rgba(18, 18, 18, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    box-shadow: 0 25px 100px rgba(0, 0, 0, 0.5),
                0 0 0 1px rgba(255, 255, 255, 0.05) inset,
                0 10px 40px rgba(120, 70, 255, 0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: slideUp 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    z-index: 10;
}

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

/* Chat Header */
.chat-header {
    background: linear-gradient(135deg, rgba(120, 70, 255, 0.2) 0%, rgba(255, 70, 150, 0.2) 100%);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    position: relative;
}

.chat-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(120, 70, 255, 0.5), 
        rgba(255, 70, 150, 0.5), 
        transparent);
}

.bot-avatar {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #7846ff 0%, #ff4696 100%);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: bold;
    font-family: 'Courier New', monospace;
    color: white;
    box-shadow: 0 4px 15px rgba(120, 70, 255, 0.4);
    position: relative;
}

.bot-avatar::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 16px;
    background: inherit;
    filter: blur(10px);
    opacity: 0.5;
    z-index: -1;
}

.bot-info {
    flex: 1;
}

.bot-name {
    font-size: 19px;
    font-weight: 600;
    letter-spacing: 0.3px;
    margin-bottom: 4px;
}

.bot-status {
    font-size: 13px;
    opacity: 0.8;
    display: flex;
    align-items: center;
    gap: 6px;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #00ff88;
    border-radius: 50%;
    box-shadow: 0 0 10px #00ff88;
    animation: pulse 2s infinite;
}

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

/* Settings Button */
.settings-btn {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    color: rgba(255, 255, 255, 0.7);
}

.settings-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: rotate(90deg);
    color: white;
}

/* Chat Messages */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 25px;
    background: transparent;
}

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

.chat-messages::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Messages */
.message {
    margin-bottom: 20px;
    animation: fadeIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

.bot-message {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.mini-avatar {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #7846ff 0%, #ff4696 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 12px;
    font-weight: bold;
    font-family: 'Courier New', monospace;
    flex-shrink: 0;
    box-shadow: 0 3px 10px rgba(120, 70, 255, 0.3);
}

.bot-message .message-content {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.95);
    padding: 14px 18px;
    border-radius: 18px;
    border-top-left-radius: 4px;
    max-width: 80%;
    backdrop-filter: blur(10px);
    line-height: 1.5;
    font-size: 14px;
}

.user-message {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 20px;
    animation: slideInRight 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

.user-message .message-content {
    background: linear-gradient(135deg, #7846ff 0%, #ff4696 100%);
    color: white;
    padding: 14px 18px;
    border-radius: 18px;
    border-top-right-radius: 4px;
    max-width: 80%;
    box-shadow: 0 4px 15px rgba(120, 70, 255, 0.3);
    line-height: 1.5;
    font-size: 14px;
}

/* Typing Indicator */
.typing-indicator {
    display: none;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.typing-indicator.active {
    display: flex;
}

.typing-dots {
    display: flex;
    gap: 5px;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 18px;
    backdrop-filter: blur(10px);
}

.typing-dots span {
    width: 8px;
    height: 8px;
    background: linear-gradient(135deg, #7846ff, #ff4696);
    border-radius: 50%;
    animation: typing 1.4s infinite;
}

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

.typing-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 60%, 100% {
        transform: translateY(0) scale(1);
        opacity: 0.5;
    }
    30% {
        transform: translateY(-12px) scale(1.2);
        opacity: 1;
    }
}

/* Quick Actions - Removed */

/* Menu Options in Chat */
.menu-options {
    width: 100%;
}

.menu-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 15px;
    color: rgba(255, 255, 255, 0.95);
}

.menu-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-top: 12px;
}

.menu-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 12px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    backdrop-filter: blur(10px);
}

.menu-btn:hover {
    background: linear-gradient(135deg, rgba(120, 70, 255, 0.2), rgba(255, 70, 150, 0.2));
    border-color: rgba(120, 70, 255, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(120, 70, 255, 0.2);
}

.menu-btn:active {
    transform: translateY(0);
}

.menu-icon {
    font-size: 24px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.menu-text {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
    text-align: center;
}

/* Chat Input Container */
.chat-input-container {
    padding: 20px;
    background: rgba(0, 0, 0, 0.3);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    gap: 12px;
}

.chat-input {
    flex: 1;
    padding: 12px 18px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 24px;
    outline: none;
    font-size: 14px;
    color: white;
    transition: all 0.3s;
    backdrop-filter: blur(10px);
}

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

.chat-input:focus {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(120, 70, 255, 0.5);
    box-shadow: 0 0 0 3px rgba(120, 70, 255, 0.1);
}

.send-btn {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #7846ff 0%, #ff4696 100%);
    border: none;
    border-radius: 12px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(120, 70, 255, 0.3);
}

.send-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(120, 70, 255, 0.4);
}

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

/* Special Cards */
.weather-card, .lottery-card, .fortune-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 12px;
    margin-top: 12px;
    backdrop-filter: blur(10px);
}

.weather-card {
    background: linear-gradient(135deg, rgba(70, 150, 255, 0.1) 0%, rgba(120, 70, 255, 0.1) 100%);
}

.fortune-card {
    background: linear-gradient(135deg, rgba(255, 70, 150, 0.1) 0%, rgba(255, 150, 70, 0.1) 100%);
}

.lottery-numbers {
    display: flex;
    gap: 10px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.lottery-ball {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, #7846ff 0%, #ff4696 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 15px;
    animation: ballBounce 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 4px 10px rgba(120, 70, 255, 0.3);
}

@keyframes ballBounce {
    0% {
        transform: scale(0) rotate(0deg);
        opacity: 0;
    }
    50% {
        transform: scale(1.2) rotate(180deg);
    }
    100% {
        transform: scale(1) rotate(360deg);
        opacity: 1;
    }
}

.service-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-top: 12px;
}

.service-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 12px;
    border-radius: 10px;
    text-align: center;
    font-size: 13px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    transition: all 0.3s;
}

.service-item:hover {
    background: rgba(120, 70, 255, 0.1);
    transform: translateY(-2px);
    border-color: rgba(120, 70, 255, 0.3);
    cursor: pointer;
}

/* Links in messages */
.message-content a {
    color: #7846ff;
    text-decoration: none;
    border-bottom: 1px solid rgba(120, 70, 255, 0.3);
    transition: all 0.3s;
}

.message-content a:hover {
    color: #ff4696;
    border-bottom-color: #ff4696;
}

.service-icon {
    font-size: 28px;
    margin-bottom: 8px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

/* Responsive */
@media (max-width: 500px) {
    body {
        height: 100vh;
        min-height: 100vh;
        overflow: hidden;
    }
    
    .chat-container {
        width: 100%;
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
    }
    
    .chat-header {
        border-radius: 0;
    }
    
    /* Prevent body scroll on mobile */
    body::before {
        display: none;
    }
}