@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700&display=swap');

:root {
    --primary-color: #4a90e2;
    --secondary-color: #f39c12;
    --text-color: #333;
    --bg-color: #f4f4f4;
    --card-bg: #ffffff;
    --header-bg: #ffffff;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --primary-rgb: 74, 144, 226;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(var(--primary-rgb), 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(var(--primary-rgb), 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(var(--primary-rgb), 0);
    }
}

.dark-mode {
    --primary-color: #64b5f6;
    --secondary-color: #ffa726;
    --text-color: #e0e0e0;
    --bg-color: #121212;
    --card-bg: #1e1e1e;
    --header-bg: #1a1a1a;
    --shadow: 0 4px 6px rgba(255, 255, 255, 0.1);
}

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

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    transition: background-color 0.3s, color 0.3s;
}

header {
    background-color: var(--header-bg);
    box-shadow: var(--shadow);
    position: fixed;
    width: 100%;
    z-index: 1000;
    transition: background-color 0.3s;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin-left: 2rem;
}

nav ul li a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}

nav ul li a:hover {
    color: var(--primary-color);
}

#theme-toggle, .mobile-menu-toggle {
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1.2rem;
    cursor: pointer;
    transition: color 0.3s;
}

#theme-toggle:hover, .mobile-menu-toggle:hover {
    color: var(--primary-color);
}

main {
    padding-top: 80px;
}

section {
    padding: 4rem 5%;
    max-width: 80%;
    margin: 0 auto;
}

h1, h2, h3 {
    margin-bottom: 1rem;
}

h1 {
    font-size: 2.5rem;
    color: var(--primary-color);
}

h2 {
    font-size: 2rem;
    color: var(--secondary-color);
}

h3 {
    font-size: 1.5rem;
}

p {
    margin-bottom: 1rem;
}

.animate-section {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.5s, transform 0.5s;
}

.animate-section.animate {
    opacity: 1;
    transform: translateY(0);
}

.feature-grid, .pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.demo-grid{
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.feature-card, .pricing-card, {
    background-color: var(--card-bg);
    border-radius: 10px;
    padding: 2rem;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
}

.feature-card:hover, .pricing-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.feature-card i {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.pricing-card {
    text-align: center;

}

.pricing-card.featured {
    border: 2px solid var(--primary-color);
}

.price {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 1rem 0;
}

.cta-button {
    display: inline-block;
    background-color: var(--primary-color);
    color: #ffffff;
    padding: 0.75rem 1.5rem;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.3s;
}

.cta-button:hover {
    background-color: var(--secondary-color);
}

form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 500px;
    margin: 0 auto;
}

input, textarea {
    padding: 0.75rem;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-family: inherit;
    background-color: var(--card-bg);
    color: var(--text-color);
}

button[type="submit"] {
    align-self: flex-start;
}

footer {
    background-color: var(--header-bg);
    color: var(--text-color);
    padding: 2rem 5%;
    margin-top: 2rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-section {
    flex: 1;
    min-width: 200px;
}

.footer-section h4 {
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section ul li a:hover {
    color: var(--primary-color);
}

.social-icons {
    display: flex;
    gap: 1rem;
}

.social-icons a {
    color: var(--text-color);
    font-size: 1.5rem;
    transition: color 0.3s;
}

.social-icons a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    text-align: center;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--text-color);
}

/* Responsiveness */
@media (max-width: 768px) {
    nav ul {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--header-bg);
        box-shadow: var(--shadow);
    }

    nav ul.show {
        display: flex;
    }

    nav ul li {
        margin: 0;
        text-align: center;
    }

    nav ul li a {
        display: block;
        padding: 1rem;
    }

    .mobile-menu-toggle {
        display: block;
    }

    .feature-grid, .pricing-grid {
        grid-template-columns: 1fr;
    }

    /* Hide demo cards on mobile */
    .demo-card {
        display: none;
    }

    /* Show demo notice on mobile */
    .demo-notice {
        display: block;
    }
}

@media (min-width: 769px) {
    .mobile-menu-toggle {
        display: none;
    }

    /* Hide demo notice on desktop */
    .demo-notice {
        display: none;
    }
}

/* Demo notice styles */
.demo-notice {
    text-align: center;
    padding: 1rem;
    background-color: var(--card-bg);
    border-radius: 10px;
    margin-bottom: 1rem;
    box-shadow: var(--shadow);
}


/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

.animate-fade-in {
    animation: fadeIn 1s ease-out;
}

.animate-slide-in {
    animation: slideIn 0.5s ease-out;
}

/* Demo widget styles */
.demo-container {
    background-color: var(--card-bg);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.demo-header {
    background-color: var(--primary-color);
    color: #ffffff;
    padding: 1rem;
    display: flex;
    align-items: center;
}

.demo-header img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 1rem;
}

.demo-chat {
    height: 300px;
    overflow-y: auto;
    padding: 1rem;
}

.demo-input {
    display: flex;
    padding: 1rem;
    border-top: 1px solid var(--text-color);
}

.demo-input input {
    flex-grow: 1;
    margin-right: 1rem;
}

.demo-input button {
    background-color: var(--primary-color);
    color: #ffffff;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.demo-input button:hover {
    background-color: var(--secondary-color);
}

.demo-card {
    position: relative;
    width: 100%;
    padding-bottom: 150%; /* 2:3 aspect ratio for a more vertical layout */
    height: 0;
    overflow: hidden;
    margin-bottom: 2rem;
    border: 2px solid var(--primary-color);
    border-radius: 10px;
    background-color: var(--card-bg);
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.demo-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

.demo-card iframe {
    position: absolute;
    top: 40px; /* Make room for the title */
    left: 0;
    width: 100%;
    height: calc(100% - 40px); /* Adjust height to account for title */
    border: none;
    border-radius: 0 0 8px 8px; /* Round bottom corners */
}

.demo-card-title {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    padding: 10px;
    background-color: var(--primary-color);
    color: #ffffff;
    font-weight: bold;
    text-align: center;
    border-radius: 8px 8px 0 0; /* Round top corners */
    z-index: 1;
}

.message {
    margin-bottom: 1rem;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    max-width: 80%;
}

.message.user {
    background-color: var(--primary-color);
    color: #ffffff;
    align-self: flex-end;
    margin-left: auto;
}

.message.bot {
    background-color: var(--secondary-color);
    color: #ffffff;
    align-self: flex-start;
}

/* Prizing */
.pricing-card {
    background-color: var(--card-bg);
    border-radius: 10px;
    padding: 2rem;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
    border: 2px solid var(--text-color);
    position: relative;
    overflow: hidden;
}

.pricing-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

.pricing-card.featured {
    border-color: var(--primary-color);
    border-width: 3px;
}

.pricing-card.featured::before {
    content: 'FEATURED';
    position: absolute;
    top: 0;
    right: 0;
    background-color: var(--primary-color);
    color: #ffffff;
    padding: 0.5rem 2.5rem;
    font-size: 0.8rem;
    font-weight: bold;
    transform: rotate(45deg) translate(25%, -50%);
}

.pricing-card h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.price {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--secondary-color);
    margin: 1rem 0;
}

.pricing-card ul {
    list-style-type: none;
    padding: 0;
    margin: 1.5rem 0;
}

.pricing-card ul li {
    margin-bottom: 0.5rem;
    position: relative;
    padding-left: 1.5rem;
}

.pricing-card ul li::before {
    content: '✓';
    color: var(--primary-color);
    position: absolute;
    left: 0;
}

.cta-button {
    display: inline-block;
    background-color: var(--primary-color);
    color: #ffffff;
    padding: 0.75rem 1.5rem;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.3s;
    width: 100%;
    text-align: center;
}

.cta-button:hover {
    background-color: var(--secondary-color);
}

/* Features */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.feature-card {
    background-color: var(--card-bg);
    border-radius: 15px;
    padding: 2rem;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
    border: 2px solid var(--primary-color);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

.feature-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(var(--primary-rgb), 0.1) 0%, rgba(var(--primary-rgb), 0) 70%);
    transition: transform 0.3s ease-out;
}

.feature-card:hover::before {
    transform: scale(1.2);
}

.feature-card i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
    animation: pulse 2s infinite;
}

.feature-card h3 {
    font-size: 1.5rem;
    color: var(--text-color);
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
}

.feature-card p {
    color: var(--text-color);
    position: relative;
    z-index: 1;
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    font-size: 18px;
    font-weight: bold;
    text-align: center;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.btn-primary {
    background-color: #007bff;
    color: #fff;
}

.btn-primary:hover {
    background-color: #0056b3;
}

.app-demo-container {
    margin-bottom: 20px;
}