@font-face {
    font-family: 'Space Grotesk Qwantium';
    src: url('/fonts/SpaceGroteskQu.ttf') format('truetype');
}

@font-face {
    font-family: 'MuseoModerno';
    src: url('/fonts/MuseoModerno.ttf') format('truetype');
}

@font-face {
    font-family: 'Inter';
    src: url('/fonts/Inter-Regular.ttf') format('truetype');
}

@font-face {
    font-family: 'Work Sans';
    src: url('/fonts/WorkSans-Regular.ttf') format('truetype');
}

@font-face {
    font-family: 'Syne';
    src: url('/fonts/Syne.ttf?v=3') format('truetype');
}

@font-face {
    font-family: 'Epilogue';
    src: url('/fonts/Epilogue.ttf') format('truetype');
}

@font-face {
    font-family: 'BioRhyme';
    src: url('/fonts/BioRhyme.ttf') format('truetype');
}

@font-face {
    font-family: 'Bricolage Grotesque';
    src: url('/fonts/BricolageGrotesque.ttf') format('truetype');
}

@font-face {
    font-family: 'Modern Antiqua';
    src: url('/fonts/ModernAntiqua-Regular.ttf') format('truetype');
}

@font-face {
    font-family: 'Orbitron';
    src: url('/fonts/Orbitron.ttf') format('truetype');
}

@font-face {
    font-family: 'Gabriela';
    src: url('/fonts/Gabriela-Regular.ttf') format('truetype');
}

@font-face {
    font-family: 'JosefinSans';
    src: url('/fonts/JosefinSans-Regular.ttf') format('truetype');
}

@font-face {
    font-family: 'Cascadia_Mono';
    src: url('/fonts/CascadiaMono.ttf') format('truetype');
}

:root {
    --app-font: 'Space Grotesk Qwantium', sans-serif;
}

.btn-style-square .rm-input,
.btn-style-square .add-btn,
.btn-style-square .rm-section,
.btn-style-square button {
    border-radius: 4px !important;
}

.btn-style-futuristic .rm-input,
.btn-style-futuristic .add-btn,
.btn-style-futuristic .rm-section,
.btn-style-futuristic button {
    border-radius: 0 !important;
    clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
}

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

:root {
    --bg: 245 247 250;
    --fg: 20 23 30;
    --card: 255 255 255;
    --primary: 14 165 233;
    --muted: 234 236 240;
    --muted-fg: 100 116 139;
    --border: 222 226 230;
}

.dark {
    --bg: 14 17 22;
    --fg: 230 230 230;
    --card: 26 29 36;
    --primary: 34 211 238;
    --muted: 42 47 58;
    --muted-fg: 156 163 175;
    --border: 42 47 58;
}

body {
    font-family: var(--app-font, 'Space Grotesk Qwantium', sans-serif);
    background-color: rgb(var(--bg));
    color: rgb(var(--fg));
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: background-color .2s;
}

.icon-btn svg {
    width: 1.25rem;
    height: 1.25rem;
    stroke: currentColor;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.topbar-search-link {
    flex-shrink: 0;
    margin-left: auto;
}

@media (max-width: 600px) {
    .topbar-inner {
        justify-content: space-between;
    }
}

.rm-main {
    flex: 1;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

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

.rm-header h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: .5rem;
}

.rm-header p {
    color: rgb(var(--muted-fg));
}

.rm-section {
    background-color: rgb(var(--card));
    border: 1px solid rgb(var(--border));
    border-radius: 1rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.section-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
    border-bottom: 1px solid rgb(var(--border));
    padding-bottom: .5rem;
    display: flex;
    align-items: center;
    gap: 9px;
}

.section-title svg {
    width: 18px;
    height: 18px;
    stroke: rgb(var(--primary));
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
    flex-shrink: 0;
}

.add-row {
    display: flex;
    gap: .75rem;
    flex-wrap: wrap;
    align-items: flex-end;
}

.add-row-fields {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: .5rem;
    min-width: 220px;
}

.add-row-fields label {
    font-size: .8rem;
    font-weight: 500;
    color: rgb(var(--muted-fg));
    letter-spacing: .02em;
}

.rm-input {
    width: 100%;
    height: 42px;
    padding: 0 .85rem;
    background-color: rgb(var(--bg));
    border: 1px solid rgb(var(--border));
    border-radius: .5rem;
    font-family: inherit;
    font-size: .9rem;
    color: rgb(var(--fg));
    outline: none;
    transition: border-color .2s, box-shadow .2s;
}

.rm-input::placeholder {
    color: rgb(var(--muted-fg));
}

.rm-input:focus {
    border-color: rgb(var(--primary));
    box-shadow: 0 0 0 3px rgba(var(--primary) / .15);
}

.scope-group {
    display: flex;
    gap: .5rem;
    background: rgb(var(--muted));
    padding: .25rem;
    border-radius: .5rem;
    height: 42px;
    align-items: center;
}

.scope-group label {
    padding: .35rem .9rem;
    border-radius: .4rem;
    cursor: pointer;
    font-size: .85rem;
    transition: .15s;
    white-space: nowrap;
    color: rgb(var(--fg));
    font-weight: normal;
    letter-spacing: normal;
}

.scope-group input {
    display: none;
}

.scope-group label:has(input:checked) {
    background: rgb(var(--card));
    box-shadow: 0 2px 4px rgba(0, 0, 0, .1);
    font-weight: 600;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    padding: .6rem 1.25rem;
    background-color: rgb(var(--primary));
    color: #fff;
    border: none;
    border-radius: .5rem;
    font-family: inherit;
    font-size: .9rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity .2s;
    white-space: nowrap;
    height: 42px;
}

.btn-primary:hover {
    opacity: .85;
}

.btn-primary svg {
    width: 15px;
    height: 15px;
    stroke: currentColor;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.add-error {
    margin-top: .5rem;
    font-size: .85rem;
    color: #ef4444;
    min-height: 1.2em;
}

.info-banner {
    display: flex;
    gap: .75rem;
    align-items: flex-start;
    background: rgba(var(--primary) / .07);
    border: 1px solid rgba(var(--primary) / .2);
    border-radius: .75rem;
    padding: 1rem 1.1rem;
    margin-bottom: 1.5rem;
}

.info-banner svg {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    stroke: rgb(var(--primary));
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
    margin-top: 2px;
}

.info-banner-body strong {
    display: block;
    font-size: .9rem;
    font-weight: 600;
    margin-bottom: .2rem;
    color: rgb(var(--fg));
}

.info-banner-body p {
    font-size: .85rem;
    color: rgb(var(--muted-fg));
}

.blocked-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: .6rem;
}

.blocked-item {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .7rem .9rem;
    background: rgb(var(--bg));
    border: 1px solid rgb(var(--border));
    border-radius: .65rem;
    transition: border-color .15s;
}

.blocked-item:hover {
    border-color: rgb(var(--primary));
}

.blocked-item-icon {
    width: 30px;
    height: 30px;
    border-radius: 7px;
    background: rgba(var(--primary) / .08);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.blocked-item-icon svg {
    width: 15px;
    height: 15px;
    stroke: rgb(var(--primary));
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.blocked-item-domain {
    flex: 1;
    font-size: .9rem;
    font-weight: 500;
    word-break: break-all;
}

.blocked-item-badge {
    font-size: .72rem;
    font-weight: 600;
    padding: .15rem .55rem;
    border-radius: 99px;
    flex-shrink: 0;
}

.badge-domain {
    background: rgba(var(--primary) / .12);
    color: rgb(var(--primary));
}

.badge-subdomain {
    background: rgba(234 179 8 / .15);
    color: rgb(202 138 4);
}

.dark .badge-subdomain {
    color: rgb(250 204 21);
}

.btn-remove {
    background: none;
    border: none;
    padding: .35rem;
    border-radius: .4rem;
    cursor: pointer;
    color: rgb(var(--muted-fg));
    display: flex;
    align-items: center;
    transition: color .15s, background .15s;
    flex-shrink: 0;
}

.btn-remove:hover {
    color: #ef4444;
    background: rgba(239 68 68 / .1);
}

.btn-remove svg {
    width: 15px;
    height: 15px;
    stroke: currentColor;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.list-empty {
    text-align: center;
    padding: 2.5rem 1rem;
    color: rgb(var(--muted-fg));
    font-size: .9rem;
}

.list-empty svg {
    width: 36px;
    height: 36px;
    stroke: rgb(var(--border));
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
    display: block;
    margin: 0 auto 10px;
}

.list-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 1rem;
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .5rem 1rem;
    background: rgb(var(--muted));
    color: rgb(var(--fg));
    border: none;
    border-radius: .5rem;
    font-family: inherit;
    font-size: .85rem;
    font-weight: 500;
    cursor: pointer;
    transition: opacity .2s;
}

.btn-secondary:hover {
    opacity: .75;
}

.btn-secondary svg {
    width: 13px;
    height: 13px;
    stroke: currentColor;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.rm-toast {
    position: fixed;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%) translateY(6px);
    background: rgb(var(--card));
    border: 1px solid rgb(var(--border));
    border-radius: .6rem;
    padding: .65rem 1.2rem;
    font-size: .875rem;
    font-weight: 500;
    box-shadow: 0 6px 24px rgba(0, 0, 0, .12);
    opacity: 0;
    transition: opacity .25s, transform .25s;
    pointer-events: none;
    z-index: 999;
    white-space: nowrap;
}

.rm-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.footer {
    border-top: 1px solid rgb(var(--border));
    font-size: .875rem;
    color: rgb(var(--muted-fg));
    margin-top: auto;
}

.footer-inner {
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.footer-link {
    color: rgb(var(--muted-fg));
    text-decoration: none;
    transition: color .18s;
}

.footer-link:hover {
    color: rgb(var(--fg));
}

@media (max-width: 600px) {
    .header {
        padding: .75rem 1rem;
    }

    .rm-main {
        padding: 1.5rem .75rem;
    }

    .add-row {
        flex-direction: column;
    }

    .scope-group {
        height: auto;
        flex-wrap: wrap;
    }

    .btn-primary {
        width: 100%;
        justify-content: center;
    }

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