/* Base Styles */
:root {
    --primary-color: #0084ff;
    --secondary-color: #9bdafe;
    --accent-color: #002dc0;
    --dark-color: #2d3436;
    --light-color: #f5f6fa;
    --success-color: #004ab8;
    --warning-color: #fdcb6e;
    --danger-color: #d63031;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    background-color: var(--light-color);
    color: var(--dark-color);
    overflow-x: hidden;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin:  auto;
}

/* Loading Animation */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.loader-inner {
    display: flex;
    justify-content: center;
    align-items: center;
}

.loader-circle {
    width: 20px;
    height: 20px;
    margin: 0 10px;
    background-color: var(--primary-color);
    border-radius: 50%;
    animation: bounce 1.5s infinite ease-in-out;
}

.loader-circle:nth-child(1) {
    animation-delay: 0s;
}
.loader-circle:nth-child(2) {
    animation-delay: 0.2s;
}
.loader-circle:nth-child(3) {
    animation-delay: 0.4s;
}
.loader-circle:nth-child(4) {
    animation-delay: 0.6s;
}
.loader-circle:nth-child(5) {
    animation-delay: 0.8s;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-30px);
    }
}

/* Header */
.header {
    background-color: var(--dark-color);
    color: white;
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h1 {
    font-size: 1.8rem;
    font-weight: 700;
}

.logo h1 span {
    color: var(--primary-color);
}

.navbar ul {
    display: flex;
    list-style: none;
}

.navbar ul li {
    margin-left: 2rem;
}

.navbar ul li a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.navbar ul li a:hover, .navbar ul li a.active {
    color: var(--primary-color);
}

.mobile-menu {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    margin-top: 70px;
}

.hero-content {
    margin: auto;
    position: relative;
    z-index: 2;
    max-width: 600px;
}

.hero-content h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
    background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: var(--dark-color);
}

.buttons {
    display: flex;
    gap: 1rem;
}

.btn {
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    border: 2px solid var(--primary-color);
}

.btn-primary:hover {
    background-color: transparent;
    color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(108, 92, 231, 0.3);
}

.btn-secondary {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(108, 92, 231, 0.3);
}

.hero-bg {
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    clip-path: polygon(30% 0, 100% 0, 100% 100%, 0% 100%);
    z-index: 1;
}

/* Animated Text */
.animated-text {
    animation: fadeInUp 1s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Chatbot */
.chatbot-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 350px;
    height: 500px;
    background-color: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    transform: translateY(100%);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 1001;
}

.chatbot-container.active {
    transform: translateY(0);
    opacity: 1;
}

.chatbot-header {
    padding: 1rem;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    border-top-left-radius: 15px;
    border-top-right-radius: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chatbot-header h3 {
    font-size: 1.2rem;
}

.close-chatbot {
    background: none;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
}

.chatbot-messages {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
}

.chatbot-message {
    margin-bottom: 1rem;
    padding: 0.8rem 1rem;
    background-color: var(--light-color);
    border-radius: 10px;
    max-width: 80%;
}

.chatbot-input {
    display: flex;
    padding: 1rem;
    border-top: 1px solid #eee;
}

.chatbot-input input {
    flex: 1;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 50px;
    outline: none;
}

.chatbot-input button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    margin-left: 0.5rem;
    cursor: pointer;
}

.chatbot-trigger {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    border: none;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(108, 92, 231, 0.4);
    z-index: 1000;
    transition: all 0.3s ease;
}

.chatbot-trigger:hover {
    transform: scale(1.1);
}

/* Game Page Styles */
.game-page {
    padding: 2rem 0;
}

.ad-section {
    margin-bottom: 3rem;
}

.ad-card {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(108, 92, 231, 0.3);
    animation: pulse 2s infinite;
}

.ad-card h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.ad-card p {
    margin-bottom: 1.5rem;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(108, 92, 231, 0.7);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(108, 92, 231, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(108, 92, 231, 0);
    }
}

.categories {
    margin-bottom: 3rem;
}

.section-title {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2rem;
    color: var(--dark-color);
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
}

.category-card {
    background-color: white;
    border-radius: 15px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.category-card h3 {
    margin-bottom: 1.5rem;
    color: var(--primary-color);
    font-size: 1.5rem;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

.product-card {
    background-color: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.product-image {
    height: 150px;
    background-size: cover;
    background-position: center;
}

.product-info {
    padding: 1rem;
}

.product-info h4 {
    margin-bottom: 0.5rem;
    color: var(--dark-color);
}

.product-code {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.product-price {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.btn-order {
    width: 100%;
    background-color: var(--success-color);
    color: white;
    border: none;
    padding: 0.6rem;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.btn-order:hover {
    background-color: #00997b;
}

/* Footer */
.footer {
    background-color: var(--dark-color);
    color: white;
    padding: 2rem 0;
    text-align: center;
}

.footer p {
    margin: 0;
}

/* Responsive Styles */
@media (max-width: 992px) {
    .hero-bg {
        width: 60%;
    }
}

@media (max-width: 768px) {
    .navbar {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 80%;
        height: calc(100vh - 70px);
        background-color: var(--dark-color);
        flex-direction: column;
        padding: 2rem;
        transition: left 0.3s ease;
    }

    .navbar.active {
        left: 0;
    }

    .navbar ul {
        flex-direction: column;
    }

    .navbar ul li {
        margin: 1rem 0;
    }

    .mobile-menu {
        display: block;
    }

    .hero {
        text-align: center;
    }

    .hero-content {
        max-width: 100%;
    }

    .buttons {
        justify-content: center;
    }

    .hero-bg {
        display: none;
    }

    .chatbot-container {
        width: 90%;
        right: 5%;
    }
}

@media (max-width: 576px) {
    .hero-content h2 {
        font-size: 2.2rem;
    }

    .buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        text-align: center;
    }
}

/* Previous CSS remains the same, just add these updates */

/* Footer fix */
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.main-content {
    flex: 1;
}

.footer {
    margin-top: auto;
}

/* Chatbot header update */
.chatbot-header h3 i {
    margin-right: 8px;
}

/* Category icons */
.category-card h3 i {
    margin-right: 10px;
    color: var(--primary-color);
}

/* Product card sizing */
.product-card {
    width: 280px;
    margin: 0 auto;
}

.product-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

/* Category grid layout */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .category-grid {
        grid-template-columns: 1fr;
    }
    
    .product-card {
        width: 100%;
        max-width: 300px;
    }
}