:root {
    --primary-color: #8fbc3f;
    --secondary-color: #f39c12;
    --dark-bg: #0f172a;
    --card-bg: #1e293b;
    --text-light: #f1f5f9;
    --text-muted: #94a3b8;
    --border-color: rgba(143, 188, 63, 0.2);
    --success-color: #10b981;
    --danger-color: #ef4444;
}

.hero-particles {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 1;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Vazirmatn', sans-serif;
    background: linear-gradient(135deg, var(--dark-bg) 0%, #1a2332 100%);
    color: var(--text-light);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Animated Background */
.animated-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.floating-icon {
    position: absolute;
    font-size: 3rem;
    opacity: 0.1;
    animation: float 20s infinite ease-in-out;
}

.floating-icon:nth-child(1) {
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.floating-icon:nth-child(2) {
    top: 60%;
    left: 80%;
    animation-delay: 5s;
}

.floating-icon:nth-child(3) {
    top: 80%;
    left: 20%;
    animation-delay: 10s;
}

.floating-icon:nth-child(4) {
    top: 30%;
    left: 70%;
    animation-delay: 15s;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    25% {
        transform: translateY(-30px) rotate(5deg);
    }

    50% {
        transform: translateY(-60px) rotate(-5deg);
    }

    75% {
        transform: translateY(-30px) rotate(3deg);
    }
}

/* Navigation */
.navbar {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 2px solid var(--primary-color);
    padding: 15px 0;
    z-index: 1000;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--text-light) !important;
}

.navbar-brand img {
    height: 40px;
}

.nav-link {
    color: var(--text-light) !important;
    font-weight: 500;
    padding: 8px 15px !important;
    transition: all 0.3s ease;
    border-radius: 8px;
    margin: 0 5px;
}

.nav-link:hover,
.nav-link.active {
    background: rgba(143, 188, 63, 0.1);
    color: var(--primary-color) !important;
    transform: translateY(-2px);
}

/* AI Chat Container */
.ai-container {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* AI Header */
.ai-header {
    text-align: center;
    margin-bottom: 40px;
    position: relative;
}

.ai-avatar {
    width: 120px;
    height: 120px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 3rem;
    animation: pulse 2s infinite;
    box-shadow: 0 0 40px rgba(143, 188, 63, 0.5);
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

.ai-title {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
}

.ai-subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
}

/* Chat Box */
.chat-box {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    border: 2px solid var(--border-color);
    min-height: 500px;
    max-height: 600px;
    overflow-y: auto;
    position: relative;
}

/* Custom Scrollbar */
.chat-box::-webkit-scrollbar {
    width: 8px;
}

.chat-box::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.chat-box::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 10px;
}

/* Chat Messages */
.chat-message {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    animation: slideIn 0.4s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
}

.user-avatar {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
}

.ai-avatar-small {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

.message-content {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    padding: 15px 20px;
    border-radius: 15px;
    line-height: 1.6;
}

.user-message .message-content {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(139, 92, 246, 0.2));
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.ai-message .message-content {
    background: linear-gradient(135deg, rgba(143, 188, 63, 0.1), rgba(243, 156, 18, 0.1));
    border: 1px solid var(--border-color);
}

.message-time {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 5px;
}

/* Typing Indicator */
.typing-indicator {
    display: none;
    gap: 15px;
    margin-bottom: 25px;
}

.typing-indicator.active {
    display: flex;
}

.typing-dots {
    display: flex;
    gap: 5px;
    padding: 15px 20px;
    background: rgba(143, 188, 63, 0.1);
    border-radius: 15px;
}

.typing-dot {
    width: 10px;
    height: 10px;
    background: var(--primary-color);
    border-radius: 50%;
    animation: typingDot 1.4s infinite;
}

.typing-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typingDot {

    0%,
    60%,
    100% {
        transform: translateY(0);
    }

    30% {
        transform: translateY(-10px);
    }
}

/* Quick Questions */
.quick-questions {
    margin-bottom: 30px;
}

.quick-questions h4 {
    font-size: 1.2rem;
    color: var(--primary-color);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.question-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.question-chip {
    background: rgba(143, 188, 63, 0.1);
    border: 2px solid var(--border-color);
    color: var(--text-light);
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.question-chip:hover {
    background: var(--primary-color);
    color: var(--dark-bg);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(143, 188, 63, 0.3);
}

/* Input Area */
.input-area {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 20px;
    border: 2px solid var(--border-color);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.input-wrapper {
    display: flex;
    gap: 15px;
    align-items: center;
}

.chat-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid var(--border-color);
    color: var(--text-light);
    padding: 15px 20px;
    border-radius: 15px;
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: 'Vazirmatn', sans-serif;
}

.chat-input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 20px rgba(143, 188, 63, 0.2);
}

.chat-input::placeholder {
    color: var(--text-muted);
}

.send-btn {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border: none;
    color: white;
    width: 55px;
    height: 55px;
    border-radius: 50%;
    font-size: 1.3rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.send-btn:hover {
    transform: scale(1.1) rotate(15deg);
    box-shadow: 0 5px 20px rgba(143, 188, 63, 0.5);
}

.send-btn:active {
    transform: scale(0.95);
}

/* Recipe Card in Chat */
.recipe-suggestion {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 15px;
    margin-top: 10px;
    transition: all 0.3s ease;
}

.recipe-suggestion:hover {
    background: rgba(143, 188, 63, 0.05);
    border-color: var(--primary-color);
}

.recipe-suggestion h5 {
    color: var(--primary-color);
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.recipe-suggestion p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.recipe-meta {
    display: flex;
    gap: 15px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.recipe-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Features Section */
.features-section {
    margin-top: 50px;
}

.feature-card {
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    transition: all 0.3s ease;
    height: 100%;
}

.feature-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary-color);
    box-shadow: 0 10px 30px rgba(143, 188, 63, 0.2);
}

.feature-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.feature-card h4 {
    color: var(--text-light);
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.feature-card p {
    color: var(--text-muted);
    line-height: 1.6;
}

/* Responsive */
@media (max-width: 768px) {
    .ai-title {
        font-size: 1.8rem;
    }

    .ai-avatar {
        width: 80px;
        height: 80px;
        font-size: 2rem;
    }

    .chat-box {
        padding: 20px;
        min-height: 400px;
    }

    .input-wrapper {
        flex-direction: column;
    }

    .send-btn {
        width: 100%;
        border-radius: 15px;
    }

    .question-chips {
        flex-direction: column;
    }

    .question-chip {
        width: 100%;
        text-align: center;
    }
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 4rem;
    color: var(--primary-color);
    margin-bottom: 20px;
    opacity: 0.3;
}

.empty-state h4 {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.empty-state p {
    font-size: 1rem;
}