/* NexusAI Shared Styles */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
    --color-bg: #ffffff;
    --color-bg-alt: #f9fafb;
    --color-text: #111827;
    --color-text-secondary: #6b7280;
    --color-accent: #4f46e5;
    --color-accent-hover: #4338ca;
    --color-border: #e5e7eb;
    --color-border-light: #f3f4f6;
    --font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--color-border);
    transition: all 0.2s ease;
}

.navbar.scrolled {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.navbar-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-text);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--color-accent), #8b5cf6);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.875rem;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-link {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-text-secondary);
    text-decoration: none;
    transition: color 0.15s ease;
}

.nav-link:hover {
    color: var(--color-text);
}

.nav-link.active {
    color: var(--color-text);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.15s ease;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: var(--color-accent);
    color: white;
}

.btn-primary:hover {
    background: var(--color-accent-hover);
    transform: translateY(-1px);
}

.btn-secondary {
    background: transparent;
    color: var(--color-text);
    border: 1px solid var(--color-border);
}

.btn-secondary:hover {
    background: var(--color-bg-alt);
    border-color: var(--color-text-secondary);
}

.btn-lg {
    padding: 14px 28px;
    font-size: 1rem;
    border-radius: 12px;
}

/* Cards */
.card {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: 16px;
    padding: 24px;
    transition: all 0.2s ease;
}

.card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transform: translateY(-2px);
}

.card-flat {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.2s ease;
}

.card-flat:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transform: translateY(-2px);
}

/* Sections */
.section {
    padding: 80px 24px;
}

.section-alt {
    background: var(--color-bg-alt);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 48px;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 12px;
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--color-text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* Grid layouts */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.grid-6 {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 20px;
}

@media (max-width: 1024px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-6 { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
    .grid-2, .grid-3 { grid-template-columns: 1fr; }
    .grid-4, .grid-6 { grid-template-columns: repeat(2, 1fr); }
    .nav-links { display: none; }
    .mobile-menu-btn { display: flex; }
}

@media (max-width: 480px) {
    .grid-4, .grid-6 { grid-template-columns: 1fr; }
}

/* Tags */
.tag {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 100px;
    background: var(--color-bg-alt);
    color: var(--color-text-secondary);
    border: 1px solid var(--color-border);
    cursor: pointer;
    transition: all 0.15s ease;
}

.tag:hover, .tag.active {
    background: var(--color-accent);
    color: white;
    border-color: var(--color-accent);
}

.tag-accent {
    background: rgba(79, 70, 229, 0.1);
    color: var(--color-accent);
    border-color: rgba(79, 70, 229, 0.2);
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 100px;
    background: var(--color-bg-alt);
    border: 1px solid var(--color-border);
}

.badge-success {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
    border-color: rgba(16, 185, 129, 0.2);
}

.badge-popular {
    background: var(--color-accent);
    color: white;
}

/* Form elements */
.input {
    width: 100%;
    padding: 12px 16px;
    font-size: 0.875rem;
    border: 1px solid var(--color-border);
    border-radius: 10px;
    background: var(--color-bg);
    color: var(--color-text);
    transition: all 0.15s ease;
}

.input:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.input::placeholder {
    color: var(--color-text-secondary);
}

.textarea {
    resize: vertical;
    min-height: 120px;
}

.select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236b7280'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 20px;
    padding-right: 44px;
}

.checkbox-label, .radio-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 0.875rem;
}

.checkbox-input, .radio-input {
    width: 20px;
    height: 20px;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    cursor: pointer;
    accent-color: var(--color-accent);
}

/* Stars */
.stars {
    display: flex;
    gap: 2px;
    color: #fbbf24;
}

.star {
    width: 16px;
    height: 16px;
}

.star-empty {
    color: var(--color-border);
}

/* Avatar */
.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 600;
    color: white;
    flex-shrink: 0;
}

.avatar-sm {
    width: 32px;
    height: 32px;
    font-size: 0.75rem;
}

.avatar-lg {
    width: 48px;
    height: 48px;
    font-size: 1rem;
}

.avatar-xl {
    width: 64px;
    height: 64px;
    font-size: 1.25rem;
}

/* Modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--color-bg);
    border-radius: 20px;
    padding: 32px;
    max-width: 480px;
    width: 90%;
    text-align: center;
    transform: scale(0.9);
    transition: transform 0.2s ease;
}

.modal-overlay.active .modal {
    transform: scale(1);
}

.modal-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--color-accent), #8b5cf6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 1.5rem;
}

/* Confetti */
.confetti {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1001;
    overflow: hidden;
}

.confetti-piece {
    position: absolute;
    width: 10px;
    height: 10px;
    animation: confetti-fall 3s ease-out forwards;
}

@keyframes confetti-fall {
    0% {
        transform: translateY(-100%) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

/* Footer */
.footer {
    background: var(--color-bg);
    border-top: 1px solid var(--color-border);
    padding: 64px 24px 32px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr repeat(3, 1fr);
    gap: 48px;
    margin-bottom: 48px;
}

@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }
}

.footer-brand p {
    color: var(--color-text-secondary);
    font-size: 0.875rem;
    margin-top: 12px;
    max-width: 280px;
}

.footer-title {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-secondary);
    margin-bottom: 16px;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-link {
    font-size: 0.875rem;
    color: var(--color-text);
    text-decoration: none;
    transition: color 0.15s ease;
}

.footer-link:hover {
    color: var(--color-accent);
}

.footer-bottom {
    padding-top: 32px;
    border-top: 1px solid var(--color-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.footer-copyright {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
}

.social-links {
    display: flex;
    gap: 16px;
}

.social-link {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: var(--color-bg-alt);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-secondary);
    text-decoration: none;
    transition: all 0.15s ease;
}

.social-link:hover {
    background: var(--color-accent);
    color: white;
}

/* Page header */
.page-header {
    padding-top: 120px;
    padding-bottom: 48px;
    text-align: center;
}

.page-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 12px;
}

.page-subtitle {
    font-size: 1.125rem;
    color: var(--color-text-secondary);
}

/* Search bar */
.search-bar {
    position: relative;
    max-width: 480px;
    margin: 0 auto 40px;
}

.search-input {
    width: 100%;
    padding: 14px 20px 14px 48px;
    font-size: 1rem;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    background: var(--color-bg);
    transition: all 0.15s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-text-secondary);
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 64px 24px;
    color: var(--color-text-secondary);
}

.empty-state-icon {
    font-size: 3rem;
    margin-bottom: 16px;
}

/* Utility classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.text-3xl { font-size: 1.875rem; }
.text-gray { color: var(--color-text-secondary); }
.text-accent { color: var(--color-accent); }
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mt-8 { margin-top: 32px; }
.mb-2 { margin-bottom: 8px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.mb-8 { margin-bottom: 32px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.gap-6 { gap: 24px; }
.gap-8 { gap: 32px; }
.hidden { display: none; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }
.w-full { width: 100%; }

/* Hero gradient decoration */
.gradient-decoration {
    width: 100%;
    height: 400px;
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.1) 0%, rgba(139, 92, 246, 0.1) 50%, rgba(236, 72, 153, 0.05) 100%);
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.gradient-decoration::before {
    content: '';
    position: absolute;
    width: 200px;
    height: 200px;
    background: linear-gradient(135deg, var(--color-accent), #8b5cf6);
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
}

.gradient-decoration::after {
    content: '';
    position: absolute;
    width: 150px;
    height: 150px;
    background: linear-gradient(135deg, #ec4899, #f43f5e);
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.4;
    bottom: 20px;
    right: 20px;
}

.gradient-decoration-content {
    position: relative;
    z-index: 1;
    text-align: center;
}

/* Plan cards */
.plan-card {
    padding: 32px;
    display: flex;
    flex-direction: column;
}

.plan-card.featured {
    border-color: var(--color-accent);
    box-shadow: 0 0 0 1px var(--color-accent);
}

.plan-price {
    font-size: 3rem;
    font-weight: 700;
    color: var(--color-text);
}

.plan-price span {
    font-size: 1rem;
    font-weight: 400;
    color: var(--color-text-secondary);
}

.plan-features {
    flex: 1;
    margin: 24px 0;
}

.plan-feature {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    font-size: 0.875rem;
    color: var(--color-text-secondary);
}

.plan-feature-icon {
    color: #059669;
    flex-shrink: 0;
}

/* Article card */
.article-image {
    width: 100%;
    height: 160px;
    border-radius: 12px 12px 0 0;
}

.article-content {
    padding: 20px;
}

.article-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-text);
    margin: 8px 0;
    line-height: 1.4;
}

.article-excerpt {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    line-height: 1.5;
    margin-bottom: 12px;
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.75rem;
    color: var(--color-text-secondary);
}

.article-author {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Tool card */
.tool-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 16px;
}

.tool-rating {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 12px;
    font-size: 0.875rem;
    color: var(--color-text-secondary);
}

/* Wizard steps */
.wizard-steps {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 40px;
}

.wizard-step {
    display: flex;
    align-items: center;
    gap: 8px;
}

.wizard-step-number {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 600;
    background: var(--color-bg-alt);
    color: var(--color-text-secondary);
    border: 1px solid var(--color-border);
}

.wizard-step.active .wizard-step-number {
    background: var(--color-accent);
    color: white;
    border-color: var(--color-accent);
}

.wizard-step.completed .wizard-step-number {
    background: #059669;
    color: white;
    border-color: #059669;
}

.wizard-step-label {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    display: none;
}

@media (min-width: 768px) {
    .wizard-step-label {
        display: block;
    }
}

.wizard-step.active .wizard-step-label {
    color: var(--color-text);
    font-weight: 500;
}

/* Preview panel */
.preview-panel {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: 16px;
    overflow: hidden;
    position: sticky;
    top: 88px;
}

.preview-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    gap: 12px;
}

.preview-messages {
    padding: 20px;
    min-height: 300px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.preview-message {
    max-width: 85%;
    padding: 12px 16px;
    border-radius: 16px;
    font-size: 0.875rem;
    line-height: 1.5;
}

.preview-message.user {
    background: var(--color-accent);
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.preview-message.assistant {
    background: var(--color-bg-alt);
    color: var(--color-text);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

/* Color selector for avatar */
.color-selector {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.color-option {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.15s ease;
}

.color-option:hover, .color-option.selected {
    transform: scale(1.1);
    border-color: var(--color-text);
}

/* Avatar preview in builder */
.assistant-avatar-preview {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 600;
    color: white;
    margin: 0 auto 16px;
}
