/* Reset and Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    overflow-y: scroll;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
    color: white;
    background-color: #0f172a;
    /* Slate 900 fallback */
}

/* Gradient Background */
.min-h-screen {
    min-height: 100vh;
    background: linear-gradient(135deg, #0f172a, #581c87, #0f172a);
    padding: 0;
    /* Remove padding from main container to allow full-width header/footer */
    display: flex;
    flex-direction: column;
}

/* Main Layout Fixes */
.content-wrapper {
    flex: 1;
    padding: 1rem 2rem 2rem 2rem;
    /* Reduced top padding */
    max-width: 80rem;
    margin: 0 auto;
    width: 100%;
}


/* Layout Containers */
.header-container,
.content-container {
    max-width: 80rem;
    margin: 0 auto;
}

.header-container {
    margin-bottom: 2rem;
}

/* Global Header & Footer */
.global-header {
    padding: 1.5rem 1rem 0.5rem 1rem;
    width: 100%;
    margin: 0 auto;
    max-width: 80rem;
}

.global-footer {
    background-color: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(16px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 3rem 2rem;
    margin-top: auto;
    /* Push to bottom */
}

.footer-content {
    max-width: 80rem;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    align-items: center;
    text-align: center;
}

.footer-description {
    color: #d1d5db;
    /* gray-300 */
    max-width: 48rem;
    line-height: 1.6;
    font-size: 0.95rem;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
    color: #9ca3af;
    /* gray-400 */
    font-size: 0.875rem;
}

.footer-link {
    color: #d1d5db;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-link:hover {
    color: #c084fc;
    /* purple-400 */
}

.footer-separator {
    color: #4b5563;
    /* gray-600 */
}


/* Typography and Header */
.text-center {
    text-align: center;
}

.top-logo {
    display: block;
    height: 5rem;
    width: auto;
}

.global-header .top-logo {
    height: 4rem;
}

.logo-wrapper {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.logo-icon {
    width: 4rem;
    height: 4rem;
    color: #c084fc;
    /* purple-400 */
}

.main-title {
    font-size: 2.25rem;
    line-height: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: white;
    text-align: center;
}

.text-gradient {
    background: linear-gradient(to right, #c084fc, #f472b6);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    /* Add spacing between the terms */
}

.description {
    font-size: 1.25rem;
    /* xl */
    line-height: 1.75rem;
    color: #d1d5db;
    /* gray-300 */
    max-width: 48rem;
    /* max-w-3xl */
    margin: 0 auto 2rem auto;
    text-align: center;
}

/* CTA Button */
.cta-container {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
    margin-top: -1rem;
}

.btn-primary {
    display: inline-block;
    padding: 0.875rem 2.5rem;
    font-size: 1.125rem;
    font-weight: 700;
    color: white;
    background: linear-gradient(135deg, #a855f7, #ec4899);
    border-radius: 0.75rem;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s, opacity 0.2s;
    box-shadow: 0 4px 14px 0 rgba(168, 85, 247, 0.39);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(168, 85, 247, 0.23);
    opacity: 0.9;
}

.btn-primary:active {
    transform: translateY(1px);
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

@media (min-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.stat-card {
    background-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(16px);
    border-radius: 0.75rem;
    /* rounded-xl */
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-align: center;
}

.stat-value {
    font-size: 1.875rem;
    /* 3xl */
    font-weight: 700;
    color: #c084fc;
    /* purple-400 */
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.875rem;
    /* sm */
    color: #d1d5db;
    /* gray-300 */
}

/* Search Bar */
.search-container {
    position: relative;
    max-width: 42rem;
    /* max-w-2xl */
    margin: 0 auto;
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    /* gray-400 */
    width: 1.25rem;
    height: 1.25rem;
}

.search-input {
    width: 100%;
    padding-left: 3rem;
    padding-right: 1rem;
    padding-top: 1rem;
    padding-bottom: 1rem;
    background-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 0.75rem;
    /* rounded-xl */
    color: white;
    font-size: 1rem;
}

.search-input::placeholder {
    color: #9ca3af;
    /* gray-400 */
}

.search-input:focus {
    outline: none;
    border-color: #a855f7;
    /* purple-500 */
    box-shadow: 0 0 0 2px rgba(168, 85, 247, 0.5);
}

/* Categories Grid */
.categories-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .categories-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1280px) {
    .categories-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Category Card */
.category-card {
    cursor: pointer;
    transition: transform 0.3s ease;
}

.category-card:hover {
    transform: scale(1.05);
}

.category-card.selected {
    transform: scale(1.05);
}

.card-inner {
    position: relative;
    overflow: hidden;
    border-radius: 1rem;
    /* rounded-2xl */
    padding: 1.5rem;
    height: 100%;
    border: 2px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.card-inner:hover {
    border-color: rgba(255, 255, 255, 0.4);
}

.category-card.selected .card-inner {
    border-color: white;
    box-shadow: 0 25px 50px -12px rgba(168, 85, 247, 0.5);
    /* shadow-2xl purple */
}

.card-bg-gradient {
    position: absolute;
    inset: 0;
    opacity: 0.2;
    transition: opacity 0.3s ease;
}

.category-card:hover .card-bg-gradient {
    opacity: 0.3;
}

.card-content {
    position: relative;
    z-index: 10;
}

.card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.icon-wrapper {
    padding: 0.75rem;
    border-radius: 0.75rem;
    /* rounded-xl */
}

.card-icon {
    width: 1.5rem;
    height: 1.5rem;
    color: white;
}

.count-badge {
    font-size: 0.75rem;
    /* xs */
    font-weight: 700;
    color: #d8b4fe;
    /* purple-300 */
    background-color: rgba(255, 255, 255, 0.2);
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
}

.card-title {
    font-size: 1.125rem;
    /* lg */
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: white;
}

.card-description {
    font-size: 0.875rem;
    /* sm */
    color: #d1d5db;
    /* gray-300 */
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Expanded Content */
.examples-container {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.examples-title {
    font-size: 0.75rem;
    /* xs */
    font-weight: 600;
    color: #d8b4fe;
    /* purple-300 */
    margin-bottom: 0.5rem;
}

.example-tag {
    font-size: 0.75rem;
    /* xs */
    color: #d1d5db;
    /* gray-300 */
    background-color: rgba(255, 255, 255, 0.1);
    padding: 0.375rem 0.75rem;
    border-radius: 0.5rem;
    margin-bottom: 0.5rem;
    display: block;
}

/* Utility Gradients for Cards injected by JS */
.from-purple-500 {
    --tw-gradient-from: #a855f7;
}

.to-pink-500 {
    --tw-gradient-to: #ec4899;
}

.from-blue-500 {
    --tw-gradient-from: #3b82f6;
}

.to-cyan-500 {
    --tw-gradient-to: #06b6d4;
}

.from-green-500 {
    --tw-gradient-from: #22c55e;
}

.to-emerald-500 {
    --tw-gradient-to: #10b981;
}

.from-blue-600 {
    --tw-gradient-from: #2563eb;
}

.to-blue-700 {
    --tw-gradient-to: #1d4ed8;
}

.from-red-500 {
    --tw-gradient-from: #ef4444;
}

.to-orange-500 {
    --tw-gradient-to: #f97316;
}

.from-indigo-500 {
    --tw-gradient-from: #6366f1;
}

.from-sky-500 {
    --tw-gradient-from: #0ea5e9;
}

.from-orange-500 {
    --tw-gradient-from: #f97316;
}

.from-violet-500 {
    --tw-gradient-from: #8b5cf6;
}

.from-green-600 {
    --tw-gradient-from: #16a34a;
}

.to-teal-500 {
    --tw-gradient-to: #14b8a6;
}

.from-amber-500 {
    --tw-gradient-from: #f59e0b;
}

.to-yellow-500 {
    --tw-gradient-to: #eab308;
}

.from-gray-700 {
    --tw-gradient-from: #374151;
}

.to-gray-900 {
    --tw-gradient-to: #111827;
}

.from-cyan-500 {
    --tw-gradient-from: #06b6d4;
}

.from-pink-500 {
    --tw-gradient-from: #ec4899;
}

.to-rose-500 {
    --tw-gradient-to: #f43f5e;
}

.from-teal-500 {
    --tw-gradient-from: #14b8a6;
}

.from-red-600 {
    --tw-gradient-from: #dc2626;
}

.to-pink-600 {
    --tw-gradient-to: #db2777;
}

/* Generic Gradient Applier */
[class*="gradient-bg"] {
    background: linear-gradient(135deg, var(--tw-gradient-from), var(--tw-gradient-to));
}

/* Missing to- classes */
.to-purple-500 {
    --tw-gradient-to: #a855f7;
}

.to-blue-500 {
    --tw-gradient-to: #3b82f6;
}

.to-red-500 {
    --tw-gradient-to: #ef4444;
}

.to-blue-600 {
    --tw-gradient-to: #2563eb;
}

.to-green-500 {
    --tw-gradient-to: #22c55e;
}

.detail-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.logo-link {
    display: block;
    width: fit-content;
    text-decoration: none;
}

.workflow-description {
    margin-bottom: 2rem;
}

/* Video Container */
.video-container {
    position: relative;
    width: 100%;
    max-width: 48rem;
    /* Matches description max-width */
    margin: 0 auto 2rem auto;
    aspect-ratio: 16 / 9;
    border-radius: 1rem;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.video-container video,
.video-container iframe {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: none;
}

/* Detailed Text Grid */
.detailed-text-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-top: 2rem;
    margin-bottom: 2rem;
}

@media (min-width: 768px) {
    .detailed-text-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Rich Text List Styles */
.workflow-description ul,
.detailed-text-section ul {
    list-style-type: disc;
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

.workflow-description ol,
.detailed-text-section ol {
    list-style-type: decimal;
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

.workflow-description li,
.detailed-text-section li {
    margin-bottom: 0.5rem;
}

/* Badges */
.badges-wrapper {
    display: flex;
    gap: 0.5rem;
}

.status-badge {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-new {
    background: linear-gradient(135deg, #ec4899, #f43f5e);
    color: white;
    box-shadow: 0 2px 4px rgba(236, 72, 153, 0.3);
}

.badge-coming-soon {
    background: rgba(255, 255, 255, 0.1);
    color: #9ca3af;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Disabled Card State */
.category-card.disabled {
    cursor: default;
}

.category-card.disabled:hover {
    transform: none;
}

.category-card.disabled .card-inner {
    border-color: rgba(255, 255, 255, 0.1);
    background: rgba(15, 23, 42, 0.4);
}

.category-card.disabled:hover .card-inner {
    border-color: rgba(255, 255, 255, 0.1);
}

.category-card.disabled .card-bg-gradient {
    opacity: 0.05;
}

.category-card.disabled:hover .card-bg-gradient {
    opacity: 0.05;
}

.category-card.disabled .card-title {
    color: #9ca3af;
    margin-bottom: 0;
}

.category-card.disabled .icon-wrapper {
    filter: grayscale(100%);
    opacity: 0.5;
}

.category-card.disabled .badges-wrapper {
    opacity: 0.7;
}