:root {
    --bs-font-sans-serif: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-success: linear-gradient(135deg, #56ab2f 0%, #a8e6cf 100%);
    --shadow-soft: 0 2px 20px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 8px 25px rgba(0, 0, 0, 0.15);
    --border-radius-lg: 1rem;
}

/* Base Styles */
html {
    scroll-behavior: smooth;
    font-size: 14px;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

body {
    font-family: var(--bs-font-sans-serif);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Navigation Styles */
.navbar {
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
}

.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Hero Section */
.hero-section {
    min-height: 90vh;
    position: relative;
    overflow: hidden;
}

.hero-content {
    z-index: 2;
    position: relative;
}

.hero-underline {
    position: absolute;
    bottom: -10px;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    border-radius: 2px;
    transform: scaleX(0);
    animation: slideIn 1s ease 0.5s forwards;
}

@keyframes slideIn {
    to {
        transform: scaleX(1);
    }
}

.hero-actions .btn {
    transform: translateY(0);
    transition: all 0.3s ease;
}

    .hero-actions .btn:hover {
        transform: translateY(-2px);
        box-shadow: var(--shadow-hover);
    }

/* Feature Cards */
.feature-card {
    padding: 2rem;
    border-radius: var(--border-radius-lg);
    border: 1px solid rgba(0, 0, 0, 0.05);
    background: white;
    transition: all 0.3s ease;
    height: 100%;
}

    .feature-card:hover {
        transform: translateY(-5px);
        box-shadow: var(--shadow-hover);
        border-color: rgba(13, 110, 253, 0.2);
    }

.feature-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
}

/* CTA Section */
.cta-section {
    background: var(--gradient-primary);
    position: relative;
    overflow: hidden;
}

    .cta-section::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E") repeat;
        opacity: 0.1;
    }

/* Chat Demo */
.chat-demo-container {
    perspective: 1000px;
    transform-style: preserve-3d;
}

.chat-demo {
    background: white;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-soft);
    overflow: hidden;
    transform: rotateY(-5deg) rotateX(5deg);
    transition: transform 0.3s ease;
    max-width: 350px;
    margin: 0 auto;
}

    .chat-demo:hover {
        transform: rotateY(-2deg) rotateX(2deg) translateY(-10px);
        box-shadow: var(--shadow-hover);
    }

.chat-header {
    background: var(--gradient-primary);
    color: white;
    padding: 1rem;
}

.chat-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-messages {
    padding: 1rem;
    max-height: 300px;
    overflow-y: auto;
}

.message {
    margin-bottom: 1rem;
}

.message-content {
    max-width: 80%;
    padding: 0.75rem 1rem;
    border-radius: 1.5rem;
    word-wrap: break-word;
}

.bot-message .message-content {
    background: #f8f9fa;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.user-message {
    text-align: right;
}

    .user-message .message-content {
        background: var(--gradient-primary);
        color: white;
        margin-left: auto;
        display: inline-block;
    }

.typing-indicator {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 0.5rem;
}

    .typing-indicator span {
        width: 8px;
        height: 8px;
        border-radius: 50%;
        background: #6c757d;
        animation: typing 1.4s infinite;
    }

        .typing-indicator span:nth-child(2) {
            animation-delay: 0.2s;
        }

        .typing-indicator span:nth-child(3) {
            animation-delay: 0.4s;
        }

@keyframes typing {
    0%, 60%, 100% {
        opacity: 0.3;
        transform: translateY(0);
    }

    30% {
        opacity: 1;
        transform: translateY(-8px);
    }
}

.chat-input {
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    padding: 1rem;
}

/* Stars Animation */
.stars {
    position: relative;
}

    .stars i {
        display: inline-block;
        animation: twinkle 2s infinite;
    }

        .stars i:nth-child(2) {
            animation-delay: 0.2s;
        }

        .stars i:nth-child(3) {
            animation-delay: 0.4s;
        }

        .stars i:nth-child(4) {
            animation-delay: 0.6s;
        }

        .stars i:nth-child(5) {
            animation-delay: 0.8s;
        }

@keyframes twinkle {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.5;
        transform: scale(0.8);
    }
}

/* Custom Colors */
.text-purple {
    color: #6f42c1 !important;
}

.bg-purple {
    background-color: #6f42c1 !important;
}

/* Color Picker Enhancement */
.color-input-group {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

    .color-input-group input[type="color"] {
        width: 50px;
        height: 38px;
        border-radius: 0.375rem;
        border: 1px solid #dee2e6;
        cursor: pointer;
    }

    .color-input-group input[type="text"] {
        flex: 1;
        font-family: 'Courier New', monospace;
        font-size: 0.875rem;
    }

.color-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 0.5rem;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

/* Form Enhancements */
.form-control:focus,
.form-select:focus {
    border-color: rgba(13, 110, 253, 0.5);
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.15);
}

.was-validated .form-control:valid {
    border-color: #198754;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23198754' d='m2.3 6.73.94-.94-.94-.94L1.36 6.73z'/%3e%3c/svg%3e");
}

/* Loading States */
.btn.loading {
    position: relative;
    color: transparent !important;
}

    .btn.loading::after {
        content: '';
        position: absolute;
        width: 16px;
        height: 16px;
        top: 50%;
        left: 50%;
        margin-left: -8px;
        margin-top: -8px;
        border: 2px solid transparent;
        border-top-color: currentColor;
        border-radius: 50%;
        animation: spin 1s linear infinite;
    }

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive Utilities */
@media (max-width: 768px) {
    .hero-section {
        min-height: 70vh;
    }

    .chat-demo {
        transform: none;
        max-width: 300px;
    }

        .chat-demo:hover {
            transform: translateY(-5px);
        }

    .feature-card {
        padding: 1.5rem;
    }

    .hero-actions {
        text-align: center;
    }

        .hero-actions .btn {
            width: 100%;
            margin-bottom: 1rem;
        }
}

/* Scrollbar Customization */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(45deg, #667eea, #764ba2);
    border-radius: 4px;
}

    ::-webkit-scrollbar-thumb:hover {
        background: linear-gradient(45deg, #5a6fd8, #6a4190);
    }

/* Smooth Animations */
* {
    transition: box-shadow 0.15s ease-in-out;
}

/* Focus States */
.btn:focus,
.btn:active:focus {
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* Print Styles */
@media print {
    .navbar,
    .btn,
    .hero-social-proof {
        display: none !important;
    }

    .hero-section {
        background: white !important;
        color: black !important;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .feature-card {
        border: 2px solid #000;
    }

    .btn {
        border: 2px solid currentColor;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    ::before,
    ::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
