/* =========================================================
   FLAKEYGUIDES TOOLBOX - GLOBAL STYLES
   ========================================================= */

:root {

    /* ========= COLORS ========= */

    --bg: #0f1115;
    --bg-secondary: #171a21;
    --bg-tertiary: #20242d;

    --surface: #1d212b;
    --surface-hover: #2a3040;

    --border: #30384a;

    --text: #f2f5f7;
    --text-muted: #aeb8c7;
    --text-dim: #7f8a9b;

    --primary: #6ea8fe;
    --primary-hover: #8cbcff;

    --success: #55d187;
    --warning: #ffca70;
    --danger: #ff7b7b;

    --shadow-color: rgba(0, 0, 0, 0.35);

    /* ========= SIZING ========= */

    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 22px;

    --transition-fast: 120ms ease;
    --transition-normal: 220ms ease;

    --navbar-height: 72px;

    --content-width: 1400px;
}

/* =========================================================
   RESET
   ========================================================= */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;

    background: var(--bg);
    color: var(--text);

    font-family:
        Inter,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

    line-height: 1.5;

    min-height: 100vh;

    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

img {
    max-width: 100%;
    display: block;
}

button,
input,
textarea,
select {
    font: inherit;
}

a {
    color: inherit;
    text-decoration: none;
}

/* =========================================================
   LAYOUT
   ========================================================= */

.page {
    width: 100%;
    min-height: 100vh;
}

.container {
    width: min(100% - 32px, var(--content-width));
    margin-inline: auto;
}

.section {
    padding: 32px 0;
}

.flex {
    display: flex;
}

.grid {
    display: grid;
}

.hidden {
    display: none !important;
}

/* =========================================================
   NAVBAR
   ========================================================= */

.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;

    height: var(--navbar-height);

    display: flex;
    align-items: center;

    background: rgba(15, 17, 21, 0.82);

    backdrop-filter: blur(16px);

    border-bottom: 1px solid var(--border);
}

.navbar-inner {
    width: min(100% - 32px, var(--content-width));
    margin-inline: auto;

    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-size: 1.2rem;
    font-weight: 700;

    letter-spacing: -0.02em;
}

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

.nav-links {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-link {
    color: var(--text-muted);

    padding: 10px 14px;

    border-radius: var(--radius-sm);

    transition:
        background var(--transition-fast),
        color var(--transition-fast);
}

.nav-link:hover {
    background: var(--surface-hover);
    color: var(--text);
}

/* =========================================================
   HERO / HEADINGS
   ========================================================= */

.hero {
    padding: 72px 0 40px;
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 5rem);
    line-height: 0.95;

    margin: 0 0 18px;

    letter-spacing: -0.05em;
}

.hero-subtitle {
    max-width: 800px;

    font-size: 1.1rem;
    color: var(--text-muted);

    margin: 0;
}

.section-title {
    font-size: 1.6rem;
    font-weight: 700;

    margin-bottom: 18px;

    letter-spacing: -0.03em;
}

/* =========================================================
   TOOL GRID
   ========================================================= */

.tool-grid {
    display: grid;

    grid-template-columns:
        repeat(auto-fill, minmax(280px, 1fr));

    gap: 20px;
}

.tool-card {
    background: linear-gradient(
        180deg,
        var(--surface),
        var(--bg-secondary)
    );

    border: 1px solid var(--border);

    border-radius: var(--radius-lg);

    padding: 22px;

    transition:
        transform var(--transition-normal),
        border-color var(--transition-normal),
        background var(--transition-normal),
        box-shadow var(--transition-normal);

    cursor: pointer;
}

.tool-card:hover {
    transform: translateY(-4px);

    border-color: var(--primary);

    background: linear-gradient(
        180deg,
        var(--surface-hover),
        var(--surface)
    );

    box-shadow:
        0 10px 30px var(--shadow-color);
}

.tool-card-icon {
    font-size: 2rem;
    margin-bottom: 16px;
}

.tool-card-title {
    font-size: 1.15rem;
    font-weight: 700;

    margin-bottom: 8px;
}

.tool-card-description {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* =========================================================
   PANELS / BOXES
   ========================================================= */

.panel {
    background: var(--surface);

    border: 1px solid var(--border);

    border-radius: var(--radius-lg);

    padding: 24px;
}

.panel-title {
    margin-top: 0;
    margin-bottom: 16px;

    font-size: 1.1rem;
}

/* =========================================================
   FORMS
   ========================================================= */

.input,
.textarea,
.select {
    width: 100%;

    background: var(--bg-secondary);

    border: 1px solid var(--border);

    color: var(--text);

    border-radius: var(--radius-md);

    padding: 14px 16px;

    outline: none;

    transition:
        border-color var(--transition-fast),
        background var(--transition-fast);
}

.input:focus,
.textarea:focus,
.select:focus {
    border-color: var(--primary);

    background: var(--bg-tertiary);
}

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

/* =========================================================
   BUTTONS
   ========================================================= */

.button {
    border: none;

    border-radius: var(--radius-md);

    padding: 12px 18px;

    font-weight: 600;

    cursor: pointer;

    transition:
        transform var(--transition-fast),
        background var(--transition-fast),
        opacity var(--transition-fast);
}

.button:hover {
    transform: translateY(-1px);
}

.button-primary {
    background: var(--primary);
    color: #08111f;
}

.button-primary:hover {
    background: var(--primary-hover);
}

.button-secondary {
    background: var(--surface-hover);
    color: var(--text);
}

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

/* =========================================================
   SEARCH BAR
   ========================================================= */

.searchbar {
    width: 100%;

    display: flex;
    align-items: center;

    background: var(--surface);

    border: 1px solid var(--border);

    border-radius: 999px;

    padding: 10px 18px;

    gap: 12px;
}

.searchbar input {
    flex: 1;

    background: transparent;
    border: none;
    outline: none;

    color: var(--text);
}

.searchbar input::placeholder {
    color: var(--text-dim);
}

/* =========================================================
   TABLES
   ========================================================= */

.table-wrapper {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 14px;
    text-align: left;
}

th {
    color: var(--text-muted);
    font-weight: 600;
}

tr {
    border-bottom: 1px solid var(--border);
}

/* =========================================================
   BADGES / TAGS
   ========================================================= */

.badge {
    display: inline-flex;
    align-items: center;

    padding: 6px 10px;

    border-radius: 999px;

    background: var(--bg-tertiary);

    color: var(--text-muted);

    font-size: 0.82rem;
}

/* =========================================================
   UTILITY
   ========================================================= */

.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }

.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }

.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.gap-3 { gap: 24px; }

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

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

.center {
    text-align: center;
}

/* =========================================================
   SCROLLBAR
   ========================================================= */

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg);
}

::-webkit-scrollbar-thumb {
    background: var(--surface-hover);
    border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
    background: #3a4458;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 768px) {

    .navbar-inner {
        width: calc(100% - 20px);
    }

    .container {
        width: calc(100% - 20px);
    }

    .hero {
        padding-top: 48px;
    }

    .tool-grid {
        grid-template-columns: 1fr;
    }

    .nav-links {
        gap: 4px;
    }

    .nav-link {
        padding: 8px 10px;
    }
}

/* load component layer last */
@import url("/assets/css/components.css");