/* ========================================================
   UzaLike — Design System (based on pyisoe.com)
   ======================================================== */

/* --- Design Tokens --- */
:root {
    --color-bg:          #ffffff;
    --color-bg-alt:      #f9fafb;
    --color-bg-dark:     #0f172a;
    --color-text:        #111827;
    --color-text-muted:  #6b7280;
    --color-text-light:  #9ca3af;
    --color-accent:      #2563eb;
    --color-accent-hover:#1d4ed8;
    --color-accent-light:#eff6ff;
    --color-border:      #e5e7eb;
    --color-border-dark: #1e293b;
    --color-white:       #ffffff;
    --color-success:     #16a34a;
    --color-error:       #dc2626;

    --font:              'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --radius-sm:         6px;
    --radius:            12px;
    --radius-lg:         20px;
    --radius-full:       9999px;

    --shadow-sm:         0 1px 2px rgba(0,0,0,0.05);
    --shadow:            0 1px 3px rgba(0,0,0,0.08), 0 8px 24px rgba(0,0,0,0.06);
    --shadow-lg:         0 4px 6px rgba(0,0,0,0.05), 0 20px 48px rgba(0,0,0,0.08);
    --shadow-accent:     0 8px 32px rgba(37,99,235,0.18);

    --transition:        all 0.2s ease;
    --max-width:         1200px;
    --section-py:        6rem;
    --nav-height:        72px;
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
    font-family: var(--font);
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, textarea { font-family: inherit; }

/* --- Blazor Loading --- */
#blazor-error-ui {
    background: #fee2e2; color: #991b1b;
    padding: 0.75rem 1.5rem;
    position: fixed; bottom: 0; left: 0; right: 0;
    display: none; align-items: center; gap: 1rem;
    font-size: 0.875rem; z-index: 1000;
}
#blazor-error-ui .dismiss { margin-left: auto; cursor: pointer; font-size: 1.2rem; }
.blazor-error-boundary {
    background: #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}
.blazor-error-boundary::after { content: "An error has occurred."; }
.loading-progress {
    position: absolute; display: block;
    width: 8rem; height: 8rem;
    inset: 20vh 0 auto 0; margin: 0 auto;
}
.loading-progress circle {
    fill: none; stroke: #e0e0e0; stroke-width: 0.6rem;
    transform-origin: 50% 50%; transform: rotate(-90deg);
}
.loading-progress circle:last-child {
    stroke: var(--color-accent);
    stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
    transition: stroke-dasharray 0.05s ease-in-out;
}
.loading-progress-text {
    position: absolute; text-align: center; font-weight: bold;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}
.loading-progress-text:after { content: var(--blazor-load-percentage-text, "Loading"); }

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700; line-height: 1.2; color: var(--color-text);
}
h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
h2 { font-size: clamp(1.875rem, 3vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); }
h4 { font-size: 1.125rem; }
p  { color: var(--color-text-muted); line-height: 1.75; }

.section-label {
    display: inline-block;
    font-size: 0.75rem; font-weight: 600;
    letter-spacing: 0.1em; text-transform: uppercase;
    color: var(--color-accent);
    background: var(--color-accent-light);
    padding: 0.375rem 1rem; border-radius: var(--radius-full);
    margin-bottom: 1rem;
}
.section-title    { margin-bottom: 1rem; }
.section-subtitle {
    font-size: 1.125rem; color: var(--color-text-muted);
    max-width: 560px; line-height: 1.75;
}
.section-header   { margin-bottom: 3.5rem; }
.section-header.centered { text-align: center; }
.section-header.centered .section-subtitle { margin: 0 auto; }

/* --- Layout --- */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}
section { padding: var(--section-py) 0; }
.divider {
    width: 48px; height: 4px;
    background: var(--color-accent);
    border-radius: var(--radius-full);
    margin: 1rem 0 1.5rem;
}
.divider.centered { margin: 1rem auto 1.5rem; }

/* --- Tag --- */
.tag {
    font-size: 0.7rem; font-weight: 600;
    letter-spacing: 0.05em; text-transform: uppercase;
    color: var(--color-accent);
    background: var(--color-accent-light);
    padding: 0.25rem 0.625rem;
    border-radius: var(--radius-full);
}

/* ========================================================
   NAVIGATION
   ======================================================== */
.navbar {
    position: fixed; top: 0; left: 0; right: 0;
    height: var(--nav-height);
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow-sm);
    z-index: 100;
}
.navbar-inner {
    max-width: var(--max-width);
    margin: 0 auto; padding: 0 1.5rem;
    height: 100%;
    display: flex; align-items: center; justify-content: space-between;
    gap: 2rem;
}
.navbar-brand {
    display: flex; align-items: center; gap: 0.375rem;
    font-size: 1.125rem; font-weight: 800;
    letter-spacing: -0.01em; color: var(--color-text);
    flex-shrink: 0;
}
.navbar-brand .brand-accent { color: var(--color-accent); }
.nav-links {
    display: flex; align-items: center; gap: 0.25rem;
    flex: 1; justify-content: center;
}
.nav-link {
    padding: 0.5rem 0.875rem;
    border-radius: var(--radius-sm);
    font-size: 0.9rem; font-weight: 500;
    color: var(--color-text-muted);
    transition: var(--transition);
}
.nav-link:hover { color: var(--color-accent); background: var(--color-accent-light); }

/* ========================================================
   MAIN CONTENT AREA
   ======================================================== */
.page-content {
    padding-top: calc(var(--nav-height) + 4rem);
    padding-bottom: 4rem;
}

/* ========================================================
   SITES GRID (Home page)
   ======================================================== */
.sites-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}
.site-card {
    display: block;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 2rem;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    color: inherit;
}
.site-card:hover {
    border-color: var(--color-accent);
    box-shadow: var(--shadow);
    transform: translateY(-3px);
}
.site-card-header {
    display: flex; align-items: center; gap: 1rem;
    margin-bottom: 1rem;
}
.site-icon {
    width: 48px; height: 48px;
    background: var(--color-accent-light);
    border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.375rem; flex-shrink: 0;
    transition: var(--transition);
}
.site-card:hover .site-icon { background: var(--color-accent); }
.site-name   { font-weight: 700; font-size: 0.9375rem; }
.site-domain { font-size: 0.8rem; color: var(--color-text-muted); margin-top: 2px; }
.site-description {
    font-size: 0.875rem; color: var(--color-text-muted);
    line-height: 1.65; margin-bottom: 1rem;
}
.site-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1rem; }
.site-cta {
    display: flex; align-items: center; gap: 0.375rem;
    font-size: 0.8125rem; font-weight: 600;
    color: var(--color-accent);
}

/* ========================================================
   LEGAL PAGES (Privacy / Terms)
   ======================================================== */
.legal-body {
    margin-top: 3rem;
    display: flex; flex-direction: column; gap: 2.5rem;
}
.legal-body h2  { font-size: 1.25rem; margin-bottom: 0.75rem; }
.legal-body p   { color: var(--color-text-muted); line-height: 1.8; }
.legal-body ul  {
    list-style: disc; padding-left: 1.5rem;
    color: var(--color-text-muted); line-height: 1.8;
    display: flex; flex-direction: column; gap: 0.5rem;
}
.legal-nav {
    margin-top: 3rem; padding-top: 2rem;
    border-top: 1px solid var(--color-border);
    display: flex; align-items: center; gap: 0;
}
.legal-nav a    { color: var(--color-accent); font-size: 0.875rem; }
.legal-nav span { color: var(--color-text-muted); margin: 0 1rem; }

/* ========================================================
   FOOTER
   ======================================================== */
.footer {
    background: var(--color-bg-dark);
    color: #94a3b8;
    padding: 2.5rem 0;
}
.footer-bottom {
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: 1rem;
}
.footer-copy { font-size: 0.8125rem; color: #475569; }
.footer-copy a { color: var(--color-accent); }
.footer-link { font-size: 0.875rem; color: #64748b; transition: var(--transition); }
.footer-link:hover { color: var(--color-white); }

/* ========================================================
   RESPONSIVE
   ======================================================== */
@media (max-width: 1024px) {
    .sites-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    :root { --section-py: 4rem; }
    .nav-links { gap: 0; }
    .nav-link  { padding: 0.5rem 0.6rem; font-size: 0.85rem; }
    .sites-grid { grid-template-columns: 1fr; }
    .footer-bottom { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
    .navbar-brand { font-size: 1rem; }
}
