/* ============================================
   TOOLS HUB - SHARED STYLES
   ============================================ */

/* CSS Custom Properties - Dark Theme (Default) */
:root {
    --bg-primary: #0a0a0b;
    --bg-secondary: #111113;
    --bg-card: #18181b;
    --bg-card-hover: #1f1f23;
    --bg-input: #0f0f10;
    --border-color: #27272a;
    --border-hover: #3f3f46;
    --text-primary: #fafafa;
    --text-secondary: #a1a1aa;
    --text-muted: #71717a;
    --accent-engineering: #f59e0b;
    --accent-engineering-dim: rgba(245, 158, 11, 0.15);
    --accent-it: #06b6d4;
    --accent-it-dim: rgba(6, 182, 212, 0.15);
    --accent-general: #8b5cf6;
    --accent-general-dim: rgba(139, 92, 246, 0.15);
    --accent-success: #22c55e;
    --accent-success-dim: rgba(34, 197, 94, 0.15);
    --accent-warning: #eab308;
    --accent-warning-dim: rgba(234, 179, 8, 0.15);
    --accent-error: #ef4444;
    --accent-error-dim: rgba(239, 68, 68, 0.15);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.5);
    --grid-color: rgba(255, 255, 255, 0.02);
    --link-color: #f8f8f8;
    --link-hover: #187bed;

    --accent-biochemical: #de7010;
    --accent-biochemical-dim: rgba(239, 68, 68, 0.15);

    --accent-educational: #22c55e;
    --accent-educational-dim: rgba(34, 197, 94, 0.15);
}

/* Light Theme */
[data-theme="light"] {
    --bg-primary: #f8f9fa;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --bg-card-hover: #f1f5f9;
    --bg-input: #ffffff;
    --border-color: #e2e8f0;
    --border-hover: #cbd5e1;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --accent-engineering: #d97706;
    --accent-engineering-dim: rgba(217, 119, 6, 0.12);
    --accent-it: #0891b2;
    --accent-it-dim: rgba(8, 145, 178, 0.12);
    --accent-general: #7c3aed;
    --accent-general-dim: rgba(124, 58, 237, 0.12);
    --accent-success: #16a34a;
    --accent-success-dim: rgba(22, 163, 74, 0.12);
    --accent-warning: #ca8a04;
    --accent-warning-dim: rgba(202, 138, 4, 0.12);
    --accent-error: #dc2626;
    --accent-error-dim: rgba(220, 38, 38, 0.12);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --grid-color: rgba(0, 0, 0, 0.03);
    --link-color: #60a5fa;
    --link-hover: #93c5fd;

    --accent-biochemical: #de7010;
    --accent-biochemical-dim: rgba(220, 38, 38, 0.12);

    --accent-educational: #16a34a;
    --accent-educational-dim: rgba(22, 163, 74, 0.12);

}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Space Grotesk', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Subtle grid background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(var(--grid-color) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-color) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
    z-index: 0;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 1;
}

/* Typography */
h1 {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

h2 {
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

h3 {
    font-size: 1.125rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.mono {
    font-family: 'JetBrains Mono', monospace;
}

/* Header */
header {
    padding: 48px 0 32px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 48px;
}

.header-content {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 16px;
}

.logo-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--accent-engineering) 0%, var(--accent-it) 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    font-size: 20px;
    color: var(--bg-primary);
    text-decoration: none;
}

.tagline {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.875rem;
    color: var(--text-muted);
    letter-spacing: 0.05em;
}

.header-meta {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-align: right;
    display: flex;
    align-items: center;
    gap: 16px;
}

.header-meta span {
    color: var(--accent-engineering);
}

/* Theme Toggle */
.theme-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 6px;
}

.theme-toggle button {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: all 0.15s ease;
}

.theme-toggle button:hover {
    color: var(--text-primary);
    background: var(--bg-card);
}

.theme-toggle button.active {
    background: var(--accent-it);
    color: var(--bg-primary);
}

.theme-toggle button svg {
    width: 18px;
    height: 18px;
}

/* Breadcrumb */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.breadcrumb a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.15s ease;
}

.breadcrumb a:hover {
    color: var(--accent-it);
}

.breadcrumb span {
    color: var(--text-muted);
}

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

.card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
}

/* Tool Cards */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
}

.tool-card {
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 20px;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.tool-card::before {
    content: '';
    position: absolute;
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.tool-card.engineering::before {
    background: var(--accent-engineering);
}

.tool-card.it::before {
    background: var(--accent-it);
}

.tool-card.general::before {
    background: var(--accent-general);
}

.tool-card.biochemical::before {
    background: var(--accent-biochemical);
}

.tool-card.educational::before {
    background: var(--accent-educational);
}


.tool-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
    transform: translateY(-2px);
}

.tool-card:hover::before {
    opacity: 1;
}

.tool-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 12px;
}

.tool-icon {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.tool-icon.engineering {
    background: var(--accent-engineering-dim);
    color: var(--accent-engineering);
}

.tool-icon.it {
    background: var(--accent-it-dim);
    color: var(--accent-it);
}

.tool-icon.general {
    background: var(--accent-general-dim);
    color: var(--accent-general);
}

.tool-icon.biochemical {
    background: var(--accent-biochemical-dim);
    color: var(--accent-biochemical);
}

.tool-icon.educational {
    background: var(--accent-educational-dim);
    color: var(--accent-educational);
}

.tool-status {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.625rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 4px 8px;
    border-radius: 4px;
    background: var(--accent-warning-dim);
    color: var(--accent-warning);
}

.tool-status.active {
    background: var(--accent-success-dim);
    color: var(--accent-success);
}

.tool-name {
    font-size: 1.0625rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.tool-description {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 16px;
    flex-grow: 1;
}

.tool-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: auto;
}

.tool-tag {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.6875rem;
    padding: 4px 8px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-muted);
}

/* Category Sections */
.category-section {
    margin-bottom: 48px;
}

.category-indicator {
    width: 4px;
    height: 24px;
    border-radius: 2px;
    flex-shrink: 0;
}

.category-indicator.engineering {
    background: var(--accent-engineering);
}

.category-indicator.it {
    background: var(--accent-it);
}

.category-indicator.general {
    background: var(--accent-general);
}

.category-indicator.biochemical {
    background: var(--accent-biochemical);
}

.category-indicator.educational {
    background: var(--accent-educational);
}

.category-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
}

.category-count {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: var(--text-muted);
    padding: 4px 10px;
    background: var(--bg-secondary);
    border-radius: 12px;
}

/* Form Elements */
input, select, textarea {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9375rem;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 12px 14px;
    color: var(--text-primary);
    width: 100%;
    transition: all 0.15s ease;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--accent-it);
    box-shadow: 0 0 0 3px var(--accent-it-dim);
}

input::placeholder, textarea::placeholder {
    color: var(--text-muted);
}

select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2371717a' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 40px;
}

label {
    display: block;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
}

/* Buttons */
.btn {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8125rem;
    padding: 10px 16px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

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

.btn-primary {
    background: var(--accent-it);
    border-color: var(--accent-it);
    color: var(--bg-primary);
}

.btn-primary:hover {
    background: var(--accent-it);
    opacity: 0.9;
    border-color: var(--accent-it);
    color: var(--bg-primary);
}

/* Tags */
.tag {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.6875rem;
    color: var(--text-muted);
    background: var(--bg-secondary);
    padding: 3px 8px;
    border-radius: 4px;
    border: 1px solid var(--border-color);
}

.result-note {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    color: var(--text-muted); /* or a specific color like #eab308 for warnings */
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed var(--border-color);
    font-style: italic;
}
/* Status Badges */
.status {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.625rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 4px 8px;
    border-radius: 4px;
    background: var(--bg-secondary);
    color: var(--text-muted);
    border: 1px solid var(--border-color);
}

.status.active {
    background: var(--accent-success-dim);
    color: var(--accent-success);
    border-color: var(--accent-success);
}

.status.coming {
    background: var(--accent-warning-dim);
    color: var(--accent-warning);
    border-color: var(--accent-warning);
}

/* Footer */
footer {
    border-top: 1px solid var(--border-color);
    padding: 32px 0;
    margin-top: 48px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.footer-text {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.footer-links {
    display: flex;
    gap: 24px;
}

.footer-links a {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: var(--text-primary);
}

/* Utility Classes */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 4px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.gap-6 { gap: 24px; }
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mb-2 { margin-bottom: 8px; }
.mb-4 { margin-bottom: 16px; }
.text-center { text-align: center; }
.text-right { text-align: right; }

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

.animate-in {
    animation: fadeInUp 0.4s ease forwards;
}

/* Responsive */
@media (max-width: 768px) {
    header {
        padding: 32px 0 24px;
    }

    h1 {
        font-size: 1.5rem;
    }

    .header-meta {
        display: none;
    }

    .card {
        padding: 16px;
    }
}