/* MeshSilo Website Styles */

/* Variables */
:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary: #10b981;
    --accent: #f59e0b;
    --danger: #ef4444;

    --bg-dark: #0f172a;
    --bg-card: #1e293b;
    --bg-input: #334155;
    --border: #475569;

    --text: #f1f5f9;
    --text-muted: #94a3b8;
    --text-dark: #64748b;

    --gradient-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    --gradient-hero: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.2);
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.3);

    --radius-sm: 4px;
    --radius: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;

    --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    --font-mono: 'SF Mono', 'Fira Code', 'Consolas', monospace;
}

/* Reset */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg-dark);
    min-height: 100vh;
}

a {
    color: var(--primary-light);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--primary);
}

img {
    max-width: 100%;
    height: auto;
}

ul {
    list-style: none;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 1rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

p {
    margin-bottom: 1rem;
    color: var(--text-muted);
}

code {
    font-family: var(--font-mono);
    font-size: 0.9em;
    padding: 0.2em 0.4em;
    background: var(--bg-input);
    border-radius: var(--radius-sm);
}

pre {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    padding: 1rem;
    background: var(--bg-input);
    border-radius: var(--radius);
    overflow-x: auto;
    margin-bottom: 1rem;
}

pre code {
    padding: 0;
    background: none;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    font-size: 0.9375rem;
    font-weight: 500;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

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

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
    color: white;
}

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

.btn-secondary:hover {
    background: #059669;
    color: white;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--primary);
    color: var(--primary-light);
}

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

.btn-ghost {
    background: transparent;
    color: var(--text);
}

.btn-ghost:hover {
    background: var(--bg-card);
}

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

.btn-danger:hover {
    background: #dc2626;
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 0.875rem 1.75rem;
    font-size: 1.0625rem;
}

.btn-block {
    display: flex;
    width: 100%;
}

/* Header */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

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

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

.logo-icon {
    color: var(--primary);
}

.logo-text {
    color: var(--text);
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.main-nav a {
    color: var(--text-muted);
    font-weight: 500;
    transition: color 0.2s;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--text);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Hero Section */
.hero {
    padding: 6rem 0;
    text-align: center;
    background: var(--gradient-hero);
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    background: linear-gradient(to right, var(--text), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero .subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 2.5rem;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Page Hero */
.page-hero {
    padding: 4rem 0;
    text-align: center;
    background: var(--gradient-hero);
    border-bottom: 1px solid var(--border);
}

.page-hero h1 {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
}

.page-hero p {
    font-size: 1.125rem;
    color: var(--text-muted);
}

/* Features Grid */
.features-section {
    padding: 5rem 0;
}

.section-header {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 3rem;
}

.section-header h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.feature-card {
    background: var(--bg-card);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    transition: transform 0.2s, box-shadow 0.2s;
}

.feature-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.feature-card .icon {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
}

.feature-card p {
    color: var(--text-muted);
    font-size: 0.9375rem;
    margin: 0;
}

/* Feature Detail Section */
.features-detail {
    padding: 4rem 0;
}

.feature-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    padding: 3rem 0;
    border-bottom: 1px solid var(--border);
}

.feature-section:last-child {
    border-bottom: none;
}

.feature-section.reverse .feature-content {
    order: 2;
}

.feature-content h2 {
    font-size: 1.75rem;
    margin-bottom: 1rem;
}

.feature-content ul {
    margin-top: 1.5rem;
}

.feature-content li {
    padding: 0.5rem 0;
    color: var(--text-muted);
}

.feature-visual {
    height: 300px;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
}

/* Features List */
.features-list {
    padding: 4rem 0;
    background: var(--bg-card);
}

.features-list h2 {
    text-align: center;
    margin-bottom: 2rem;
}

.features-grid.small {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--bg-dark);
    border-radius: var(--radius);
}

.feature-item .check {
    color: var(--secondary);
    font-weight: bold;
}

/* Pricing Section */
.pricing-section {
    padding: 4rem 0;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    align-items: start;
}

.pricing-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    overflow: hidden;
    position: relative;
}

.pricing-card.featured {
    border-color: var(--primary);
    transform: scale(1.02);
}

.popular-badge {
    position: absolute;
    top: 0;
    right: 0;
    background: var(--gradient-primary);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.375rem 1rem;
    border-radius: 0 0 0 var(--radius);
}

.pricing-header {
    padding: 2rem;
    text-align: center;
    border-bottom: 1px solid var(--border);
}

.pricing-header h2 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.price {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.25rem;
}

.price .currency {
    font-size: 1.25rem;
    color: var(--text-muted);
}

.price .amount {
    font-size: 3rem;
    font-weight: 700;
}

.price .period {
    color: var(--text-muted);
}

.pricing-features {
    padding: 2rem;
}

.pricing-features ul li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 0;
    color: var(--text-muted);
}

.pricing-features .check {
    color: var(--secondary);
}

.pricing-footer {
    padding: 0 2rem 2rem;
}

.price-desc {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin: 0.5rem 0 0;
}

/* Feature Matrix */
.feature-matrix-section {
    padding: 4rem 0;
    background: var(--bg-card);
}

.feature-matrix-section h2 {
    text-align: center;
    margin-bottom: 0.5rem;
}

.feature-matrix-section > .container > p {
    margin-bottom: 2rem;
}

.feature-matrix {
    overflow-x: auto;
}

.matrix-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-dark);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.matrix-table th,
.matrix-table td {
    padding: 0.875rem 1rem;
    text-align: center;
    border-bottom: 1px solid var(--border);
}

.matrix-table th {
    background: var(--bg-input);
    font-weight: 600;
    font-size: 0.9375rem;
}

.matrix-table th.pro {
    background: rgba(99, 102, 241, 0.15);
    color: var(--primary-light);
}

.feature-name-col {
    width: 40%;
    text-align: left !important;
}

.tier-col {
    width: 20%;
}

.category-row td {
    background: var(--bg-input);
    font-weight: 600;
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    text-align: left !important;
    padding: 0.75rem 1rem;
}

.feature-name {
    text-align: left !important;
    color: var(--text-muted);
    font-size: 0.9375rem;
}

.feature-value {
    font-size: 0.9375rem;
}

.check-icon {
    color: var(--secondary);
    font-weight: bold;
    font-size: 1.125rem;
}

.dash-icon {
    color: var(--text-dark);
}

.text-value {
    color: var(--text);
    font-weight: 500;
}

.matrix-table tbody tr:hover {
    background: rgba(99, 102, 241, 0.05);
}

.matrix-table tbody tr.category-row:hover {
    background: var(--bg-input);
}

/* FAQ Section */
.faq-section {
    padding: 4rem 0;
    background: var(--bg-card);
}

.faq-section h2 {
    text-align: center;
    margin-bottom: 2rem;
}

.faq-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
}

.faq-item {
    padding: 1.5rem;
    background: var(--bg-dark);
    border-radius: var(--radius-lg);
}

.faq-item h3 {
    font-size: 1rem;
    margin-bottom: 0.75rem;
}

.faq-item p {
    color: var(--text-muted);
    font-size: 0.9375rem;
    margin: 0;
}

/* CTA Section */
.cta-section {
    padding: 5rem 0;
    text-align: center;
}

.cta-section h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.cta-section > .container > p {
    font-size: 1.125rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.cta-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Docs Section */
.docs-section {
    padding: 3rem 0;
}

.docs-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 3rem;
}

.docs-nav {
    position: sticky;
    top: 80px;
    align-self: start;
}

.docs-nav h3 {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin: 1.5rem 0 0.75rem;
}

.docs-nav h3:first-child {
    margin-top: 0;
}

.docs-nav ul li {
    margin: 0.25rem 0;
}

.docs-nav a {
    display: block;
    padding: 0.5rem 0;
    color: var(--text-muted);
    font-size: 0.9375rem;
}

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

.docs-content article {
    padding: 2rem 0;
    border-bottom: 1px solid var(--border);
}

.docs-content article:first-child {
    padding-top: 0;
}

.docs-content h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.docs-content h3 {
    font-size: 1.125rem;
    margin: 2rem 0 1rem;
}

.docs-content ul,
.docs-content ol {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.docs-content ul {
    list-style: disc;
}

.docs-content ol {
    list-style: decimal;
}

.docs-content li {
    margin: 0.5rem 0;
    color: var(--text-muted);
}

/* Footer */
.site-footer {
    padding: 3rem 0;
    background: var(--bg-card);
    border-top: 1px solid var(--border);
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-links a {
    color: var(--text-muted);
    font-size: 0.875rem;
}

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

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

/* Cards */
.card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    overflow: hidden;
}

.card-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border);
}

.card-header h2 {
    font-size: 1.125rem;
    margin: 0;
}

.card-body {
    padding: 1.5rem;
}

/* Alerts */
.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    color: var(--secondary);
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: var(--danger);
}

.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.2);
    color: var(--accent);
}

/* Tables */
.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 0.875rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.table th {
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.table tbody tr:hover {
    background: var(--bg-dark);
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.625rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 9999px;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.badge-free { background: rgba(100, 116, 139, 0.2); color: #94a3b8; }
.badge-pro { background: rgba(99, 102, 241, 0.2); color: #818cf8; }
.badge-business { background: rgba(16, 185, 129, 0.2); color: #34d399; }

.badge-active { background: rgba(16, 185, 129, 0.2); color: #34d399; }
.badge-suspended { background: rgba(239, 68, 68, 0.2); color: #f87171; }
.badge-expired { background: rgba(100, 116, 139, 0.2); color: #94a3b8; }

/* Forms */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text);
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 0.625rem 0.875rem;
    font-size: 0.9375rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-input);
    color: var(--text);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

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

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

.form-hint {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-top: 0.375rem;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

/* Admin Layout */
.admin-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    min-height: 100vh;
}

.admin-sidebar {
    background: var(--bg-card);
    border-right: 1px solid var(--border);
    padding: 1.5rem;
}

.admin-sidebar .logo {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.admin-nav a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--text-muted);
    border-radius: var(--radius);
    margin-bottom: 0.25rem;
    transition: all 0.2s;
}

.admin-nav a:hover {
    background: var(--bg-dark);
    color: var(--text);
}

.admin-nav a.active {
    background: var(--primary);
    color: white;
}

.admin-main {
    padding: 2rem;
    overflow-y: auto;
}

.page-header {
    margin-bottom: 2rem;
}

.page-header h1 {
    font-size: 1.75rem;
    margin-bottom: 0.25rem;
}

.page-header p {
    color: var(--text-muted);
    margin: 0;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--bg-card);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
}

.stat-card .label {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.stat-card .value {
    font-size: 2rem;
    font-weight: 700;
}

/* Settings Grid */
.settings-grid {
    display: grid;
    gap: 1.5rem;
}

/* Info Grid */
.info-grid {
    display: grid;
    gap: 1rem;
}

.info-item label {
    display: block;
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.info-item code {
    display: block;
    padding: 0.5rem 0.75rem;
    background: var(--bg-dark);
    border-radius: var(--radius);
    font-size: 0.875rem;
}

/* Pagination */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

.pagination a,
.pagination span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 0.5rem;
    border-radius: var(--radius);
    font-size: 0.875rem;
}

.pagination a {
    color: var(--text-muted);
    background: var(--bg-card);
    border: 1px solid var(--border);
}

.pagination a:hover {
    background: var(--bg-input);
    color: var(--text);
}

.pagination .current {
    background: var(--primary);
    color: white;
}

/* Utilities */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--text-muted); }
.text-success { color: var(--secondary); }
.text-danger { color: var(--danger); }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }

/* Mobile Responsive */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.25rem;
    }

    .hero .subtitle {
        font-size: 1rem;
    }

    .main-nav {
        display: none;
    }

    .feature-section {
        grid-template-columns: 1fr;
    }

    .feature-section.reverse .feature-content {
        order: 0;
    }

    .docs-layout {
        grid-template-columns: 1fr;
    }

    .docs-nav {
        position: static;
        padding-bottom: 2rem;
        border-bottom: 1px solid var(--border);
    }

    .admin-layout {
        grid-template-columns: 1fr;
    }

    .admin-sidebar {
        display: none;
    }

    .pricing-card.featured {
        transform: none;
    }

    .footer-inner {
        flex-direction: column;
        text-align: center;
    }
}
