/* Org1 Frontend - Custom Styles */

/* Think tags styling - aggressive spacing removal */
.think-section {
    margin: 0 !important;
    padding: 0 !important;
    display: inline !important;
    vertical-align: baseline !important;
    line-height: 1 !important;
}

.think-details {
    border: none !important;
    outline: none !important;
    margin: 0 !important;
    padding: 0 !important;
    display: inline !important;
    vertical-align: baseline !important;
    line-height: 1 !important;
    /* Override any default browser styling */
    background: none !important;
    box-shadow: none !important;
}

.think-details summary {
    list-style: none !important;
    outline: none !important;
    user-select: none;
    margin: 0 !important;
    padding: 0 !important;
    font-weight: normal;
    transition: color 0.2s ease;
    display: inline-flex !important;
    align-items: center;
    gap: 0.25rem;
    vertical-align: baseline !important;
    line-height: 1 !important;
    /* Remove any default browser styling */
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    /* Match the font size of surrounding text */
    font-size: inherit !important;
}

.think-details summary::-webkit-details-marker {
    display: none !important;
}

.think-details summary::marker {
    display: none !important;
}

.think-details[open] summary svg {
    transform: rotate(180deg);
}

.think-content {
    margin: 0 !important;
    padding: 0 !important;
    font-style: normal;
    line-height: 1.4;
    margin-top: 0.25rem;
    display: block;
    /* Ensure no extra spacing */
    vertical-align: baseline !important;
}

/* Override any Tailwind prose classes and set exact 5px spacing */
.prose .think-section,
.prose .think-details {
    margin: 5px 0 !important;
    padding: 0 !important;
}

.prose .think-details summary {
    margin: 0 !important;
    padding: 0 !important;
}

/* Override any markdown-content classes and set exact 5px spacing */
.markdown-content .think-section,
.markdown-content .think-details {
    margin: 5px 0 !important;
    padding: 0 !important;
}

.markdown-content .think-details summary {
    margin: 0 !important;
    padding: 0 !important;
}

/* Override any other container classes that might add spacing */
.leading-relaxed .think-section,
.leading-relaxed .think-details {
    margin: 5px 0 !important;
    padding: 0 !important;
}

.leading-relaxed .think-details summary {
    margin: 0 !important;
    padding: 0 !important;
}

/* World-class markdown and code styling */
.markdown-content {
    line-height: 1.75;
    color: #e5e7eb;
    letter-spacing: 0.01em;
}

        /* Minimal code blocks with subtle border and copy button */
        .markdown-content pre {
            background: transparent !important;
            border: 1px solid #374151;
            border-radius: 8px;
            padding: 1rem !important;
            margin: 1rem 0 !important;
            overflow-x: auto;
            position: relative;
            font-family: 'JetBrains Mono', 'Fira Code', 'Monaco', 'Consolas', monospace;
            font-size: 0.875rem;
            line-height: 1.6;
        }

        /* Copy button for code blocks */
        .markdown-content pre .copy-button {
            position: absolute;
            top: 0.75rem;
            right: 0.75rem;
            background: #374151;
            border: 1px solid #4b5563;
            border-radius: 4px;
            color: #9ca3af;
            padding: 0.25rem 0.5rem;
            font-size: 0.75rem;
            cursor: pointer;
            opacity: 0;
            transition: opacity 0.2s ease, background-color 0.2s ease;
            z-index: 10;
        }

        .markdown-content pre:hover .copy-button {
            opacity: 1;
        }

        .markdown-content pre .copy-button:hover {
            background: #4b5563;
            color: #e5e7eb;
        }

        .markdown-content pre .copy-button.copied {
            background: #059669;
            color: #ffffff;
            border-color: #10b981;
        }

        .markdown-content pre code {
            background: none !important;
            padding: 0 !important;
            border: none !important;
            border-radius: 0 !important;
            font-size: inherit;
            color: #e5e7eb;
        }

/* Minimal inline code */
.markdown-content code:not(pre code) {
    background: transparent;
    color: #9ca3af;
    padding: 0;
    border-radius: 0;
    font-family: 'JetBrains Mono', 'Fira Code', 'Monaco', 'Consolas', monospace;
    font-size: 0.875em;
    font-style: italic;
}

/* Minimal headings (readability-first) */
.markdown-content h1 {
    font-size: 1.6rem;
    font-weight: 600;
    color: #e5e7eb;
    margin: 1.5rem 0 0.75rem 0;
    line-height: 1.3;
}

.markdown-content h2 {
    font-size: 1.35rem;
    font-weight: 600;
    color: #d1d5db;
    margin: 1.25rem 0 0.5rem 0;
    line-height: 1.4;
}

.markdown-content h3 {
    font-size: 1.125rem;
    font-weight: 500;
    color: #9ca3af;
    margin: 1rem 0 0.5rem 0;
    line-height: 1.4;
}

.markdown-content h4 {
    font-size: 1rem;
    font-weight: 500;
    color: #9ca3af;
    margin: 1rem 0 0.5rem 0;
    line-height: 1.4;
}

/* Paragraphs */
.markdown-content p {
    margin: 0.75rem 0;
    line-height: 1.75;
    color: #e5e7eb;
    max-width: 72ch;
}

/* Lists */
.markdown-content ul, .markdown-content ol {
    margin: 0.75rem 0 0.75rem 0;
    padding-left: 1.25rem;
}

.markdown-content li {
    margin: 0.35rem 0;
    line-height: 1.6;
    color: #e5e7eb;
}

/* Emphasis helpers for world-class copy */
.markdown-content strong {
    color: #ffffff;
}
.markdown-content em {
    color: #d1d5db;
}

/* Callout blocks */
.markdown-content .callout {
    border-left: 3px solid #4b5563;
    background: rgba(55, 65, 81, 0.15);
    padding: 0.75rem 1rem;
    margin: 1rem 0;
    border-radius: 6px;
}

.markdown-content ul li {
    list-style-type: disc;
}

.markdown-content ol li {
    list-style-type: decimal;
}

/* Minimal blockquotes */
.markdown-content blockquote {
    border-left: 2px solid #6b7280;
    background: transparent;
    margin: 1rem 0;
    padding: 0.5rem 1rem;
    border-radius: 0;
    font-style: italic;
    color: #9ca3af;
}

/* Tables */
.markdown-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    background: #1f2937;
    border-radius: 8px;
    overflow: hidden;
}

.markdown-content th, .markdown-content td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid #374151;
}

.markdown-content th {
    background: #374151;
    font-weight: 600;
    color: #f9fafb;
}

.markdown-content td {
    color: #e5e7eb;
}

/* Links */
.markdown-content a {
    color: #60a5fa;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: all 0.2s ease;
}

.markdown-content a:hover {
    color: #93c5fd;
    border-bottom-color: #93c5fd;
}

/* Horizontal rules */
.markdown-content hr {
    border: none;
    height: 1px;
    background: #374151;
    margin: 2rem 0;
}

/* Syntax highlighting colors */
.markdown-content .token.comment,
.markdown-content .token.prolog,
.markdown-content .token.doctype,
.markdown-content .token.cdata {
    color: #6b7280;
    font-style: italic;
}

.markdown-content .token.punctuation {
    color: #9ca3af;
}

.markdown-content .token.property,
.markdown-content .token.tag,
.markdown-content .token.boolean,
.markdown-content .token.number,
.markdown-content .token.constant,
.markdown-content .token.symbol,
.markdown-content .token.deleted {
    color: #f472b6;
}

.markdown-content .token.selector,
.markdown-content .token.attr-name,
.markdown-content .token.string,
.markdown-content .token.char,
.markdown-content .token.builtin,
.markdown-content .token.inserted {
    color: #34d399;
}

.markdown-content .token.operator,
.markdown-content .token.entity,
.markdown-content .token.url,
.markdown-content .language-css .token.string,
.markdown-content .style .token.string {
    color: #fbbf24;
}

.markdown-content .token.atrule,
.markdown-content .token.attr-value,
.markdown-content .token.keyword {
    color: #60a5fa;
}

.markdown-content .token.function,
.markdown-content .token.class-name {
    color: #a78bfa;
}

.markdown-content .token.regex,
.markdown-content .token.important,
.markdown-content .token.variable {
    color: #f59e0b;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

/* Dark mode scrollbar */
.dark ::-webkit-scrollbar-thumb {
    background: #4b5563;
}

.dark ::-webkit-scrollbar-thumb:hover {
    background: #6b7280;
}

/* Hide scrollbar for specific elements */
.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.scrollbar-hide::-webkit-scrollbar {
    display: none;
}

/* Animation utilities */
.animate-pulse-slow {
    animation: pulse 3s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Custom focus styles */
.focus-ring {
    @apply focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 dark:focus:ring-offset-gray-800;
}

/* Button hover effects */
.btn-hover {
    @apply transition-all duration-200 hover:scale-105 hover:shadow-lg;
}

/* Card hover effects */
.card-hover {
    @apply transition-all duration-200 hover:shadow-md hover:-translate-y-1;
}

/* Text truncation */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Loading states */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    transform: translateX(-100%);
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    100% {
        transform: translateX(100%);
    }
}

/* Dark mode loading */
.dark .loading::after {
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
}

/* Theme transition */
* {
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

/* Custom gradients */
.gradient-bg {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.gradient-text {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Marketplace specific styles */
.scrollbar-hide {
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

.scrollbar-hide::-webkit-scrollbar {
    display: none;
}

/* Line clamp utility */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Enhanced Hero Animations */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

@keyframes glow {
    0%, 100% { box-shadow: 0 0 20px rgba(59, 130, 246, 0.3); }
    50% { box-shadow: 0 0 40px rgba(59, 130, 246, 0.6); }
}

@keyframes orbit {
    0% { transform: rotate(0deg) translateX(100px) rotate(0deg); }
    100% { transform: rotate(360deg) translateX(100px) rotate(-360deg); }
}

@keyframes pulse-glow {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.05); }
}

@keyframes gradient-shift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Hero specific animations */
.hero-float {
    animation: float 6s ease-in-out infinite;
}

.hero-glow {
    animation: glow 3s ease-in-out infinite;
}

.hero-orbit {
    animation: orbit 20s linear infinite;
}

.hero-pulse-glow {
    animation: pulse-glow 2s ease-in-out infinite;
}

/* Enhanced gradient text */
.gradient-text-enhanced {
    background: linear-gradient(-45deg, #3b82f6, #8b5cf6, #06b6d4, #10b981);
    background-size: 400% 400%;
    animation: gradient-shift 3s ease infinite;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Prevent layout shifts during navigation */
header {
    will-change: auto;
}

/* Smooth navigation transitions */
.nav-link {
    transition: none;
}

/* Ensure consistent header positioning */
body {
    overflow-x: hidden;
}
