/* TensorWeaver Custom Styles */

/* Base Styles */
* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

/* Custom Components */
.btn-primary {
    @apply inline-flex items-center px-4 py-2 border border-transparent text-sm font-medium rounded-lg text-white bg-accent-600 hover:bg-accent-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-accent-500 transition-all duration-200 shadow-sm hover:shadow-md;
}

.btn-primary-lg {
    @apply inline-flex items-center px-6 py-3 border border-transparent text-base font-medium rounded-lg text-white bg-accent-600 hover:bg-accent-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-accent-500 transition-all duration-200 shadow-lg hover:shadow-xl transform hover:-translate-y-0.5;
}

.btn-secondary-lg {
    @apply inline-flex items-center px-6 py-3 border border-gray-300 dark:border-primary-600 text-base font-medium rounded-lg text-gray-700 dark:text-gray-200 bg-white dark:bg-primary-800 hover:bg-gray-50 dark:hover:bg-primary-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-accent-500 transition-all duration-200 shadow-lg hover:shadow-xl transform hover:-translate-y-0.5;
}

/* Code Blocks */
.code-block {
    @apply bg-primary-900 text-primary-100 p-6 rounded-lg overflow-x-auto;
    font-family: 'JetBrains Mono', 'Consolas', monospace;
    font-size: 14px;
    line-height: 1.6;
}

.code-block code {
    @apply text-primary-100;
}

/* Syntax Highlighting */
.code-keyword { @apply text-blue-400; }
.code-string { @apply text-green-400; }
.code-comment { @apply text-gray-500; }
.code-function { @apply text-yellow-400; }
.code-class { @apply text-purple-400; }

/* Interactive Elements */
.card {
    @apply bg-white dark:bg-primary-800 rounded-xl shadow-sm border border-gray-200 dark:border-primary-700 transition-all duration-200 hover:shadow-lg hover:border-gray-300 dark:hover:border-primary-600;
}

.card-hover {
    @apply transform transition-all duration-200 hover:-translate-y-1 hover:shadow-xl;
}

/* Progress Indicators */
.progress-step {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 9999px;
    border: 2px solid;
    transition: all 0.2s;
    font-weight: 600;
}

.progress-step.active {
    background: #3b82f6;
    border-color: #3b82f6;
    color: white;
}

.progress-step.completed {
    background: #22c55e;
    border-color: #22c55e;
    color: white;
}

.progress-step.inactive {
    background: #f3f4f6;
    border-color: #d1d5db;
    color: #6b7280;
}

.dark .progress-step.inactive {
    background: #475569;
    border-color: #64748b;
    color: #9ca3af;
}

/* Learning Path Styles */
.learning-path-item {
    position: relative;
    background: white;
    border-radius: 0.5rem;
    padding: 1.5rem;
    border: 1px solid #e5e7eb;
    transition: all 0.2s;
}

.dark .learning-path-item {
    background: #1e293b;
    border-color: #475569;
}

.learning-path-item:hover {
    border-color: #93c5fd;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    transform: translateY(-0.25rem);
}

.dark .learning-path-item:hover {
    border-color: #60a5fa;
}

.learning-path-connector {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: 0.125rem;
    height: 2rem;
    background: #d1d5db;
}

.dark .learning-path-connector {
    background: #64748b;
}

/* Interactive Playground */
.playground-container {
    background: white;
    border-radius: 0.75rem;
    border: 1px solid #e5e7eb;
    overflow: hidden;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.dark .playground-container {
    background: #1e293b;
    border-color: #475569;
}

.playground-header {
    background: #f9fafb;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.dark .playground-header {
    background: #475569;
    border-color: #64748b;
}

.playground-tabs {
    display: flex;
    border-bottom: 1px solid #e5e7eb;
}

.dark .playground-tabs {
    border-color: #64748b;
}

.playground-tab {
    padding: 0.75rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-bottom: 3px solid transparent;
    background: transparent;
    transition: all 0.3s ease;
    cursor: pointer;
    color: #6b7280;
    border-radius: 0.375rem 0.375rem 0 0;
    position: relative;
    margin-right: 0.125rem;
}

.playground-tab:hover {
    background: #f9fafb;
    color: #374151;
    border-bottom-color: #d1d5db;
}

.dark .playground-tab {
    color: #9ca3af;
}

.dark .playground-tab:hover {
    background: #374151;
    color: #f3f4f6;
    border-bottom-color: #6b7280;
}

.playground-tab.active {
    background: white;
    border-bottom-color: #3b82f6;
    color: #3b82f6;
    font-weight: 600;
    transform: translateY(1px);
}

.dark .playground-tab.active {
    background: #1e293b;
    color: #60a5fa;
    border-bottom-color: #60a5fa;
}

.playground-content {
    padding: 1.5rem;
}

/* Testimonial Cards */
.testimonial-card {
    @apply bg-white dark:bg-primary-800 rounded-xl p-6 shadow-sm border border-gray-200 dark:border-primary-700;
}

/* Feature Grid */
.feature-grid {
    @apply grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8;
}

.feature-item {
    @apply text-center p-6 rounded-xl bg-white dark:bg-primary-800 border border-gray-200 dark:border-primary-700 transition-all duration-200 hover:border-accent-300 dark:hover:border-accent-600 hover:shadow-lg;
}

.feature-icon {
    @apply w-12 h-12 mx-auto mb-4 p-3 bg-accent-100 dark:bg-accent-900/30 rounded-xl text-accent-600 dark:text-accent-400;
}

/* Comparison Table */
.comparison-table {
    width: 100%;
    background: white;
    border-radius: 0.75rem;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.dark .comparison-table {
    background: #1e293b;
    border-color: #475569;
}

.comparison-header {
    background: #f9fafb;
    padding: 1rem 1.5rem;
    text-align: left;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid #e5e7eb;
}

.dark .comparison-header {
    background: #475569;
    color: #d1d5db;
    border-color: #64748b;
}

.comparison-cell {
    padding: 1rem 1.5rem;
    font-size: 0.875rem;
    color: #111827;
    border-bottom: 1px solid #e5e7eb;
    vertical-align: middle;
}

.dark .comparison-cell {
    color: #f3f4f6;
    border-color: #475569;
}

.comparison-check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.25rem;
    height: 1.25rem;
    background: #dcfce7;
    border-radius: 9999px;
    margin: 0 auto;
}

.dark .comparison-check {
    background: rgba(34, 197, 94, 0.3);
}

.comparison-x {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.25rem;
    height: 1.25rem;
    background: #fee2e2;
    border-radius: 9999px;
    margin: 0 auto;
}

.dark .comparison-x {
    background: rgba(239, 68, 68, 0.3);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

/* Email signup message styles */
.signup-message {
    transition: all 0.3s ease;
    border-width: 1px;
}

.signup-message.success {
    background-color: #dcfce7;
    color: #166534;
    border-color: #bbf7d0;
}

.signup-message.error {
    background-color: #fef2f2;
    color: #dc2626;
    border-color: #fecaca;
}

.dark .signup-message.success {
    background-color: #14532d;
    color: #bbf7d0;
    border-color: #166534;
}

.dark .signup-message.error {
    background-color: #7f1d1d;
    color: #fecaca;
    border-color: #dc2626;
}

/* Gradient Text */
.gradient-text {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Dark mode gradient text */
.dark .gradient-text {
    background: linear-gradient(135deg, #60a5fa, #3b82f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.dark ::-webkit-scrollbar-track {
    background: #1e293b;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.dark ::-webkit-scrollbar-thumb {
    background: #475569;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

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

/* Loading Skeleton */
.skeleton {
    @apply animate-pulse bg-gray-200 dark:bg-primary-700 rounded;
}

/* Interactive Code Editor */
.code-editor {
    @apply font-mono text-sm bg-primary-900 text-primary-100 p-4 rounded-lg border border-primary-700 focus:border-accent-500 focus:ring-1 focus:ring-accent-500 outline-none resize-none;
}

/* Copy Button */
.copy-btn {
    @apply absolute top-4 right-4 p-2 bg-primary-700 hover:bg-primary-600 text-primary-200 hover:text-white rounded-md transition-colors duration-200 opacity-0 group-hover:opacity-100;
}

/* Responsive Text */
.text-responsive {
    @apply text-sm sm:text-base lg:text-lg;
}

/* Focus States */
.focus-ring {
    @apply focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-accent-500 dark:focus:ring-offset-primary-800;
}

/* Backdrop Blur Support */
@supports (backdrop-filter: blur(10px)) {
    .backdrop-blur-lg {
        backdrop-filter: blur(16px);
    }
}

/* Print Styles */
@media print {
    .no-print {
        display: none !important;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .card {
        @apply border-2;
    }
    
    .btn-primary {
        @apply border-2 border-accent-800;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}