/* Repeatedly Crawl theme */
:root {
    --rp-ink: #071713;
    --rp-ink-soft: #0c211b;
    --rp-surface: #102a22;
    --rp-surface-raised: #15372c;
    --rp-line: rgba(179, 255, 218, 0.14);
    --rp-mint: #63f2aa;
    --rp-mint-strong: #27d889;
    --rp-teal: #14b889;
    --rp-cream: #f4fbf7;
    --rp-copy: #dcece4;
    --rp-muted: #8da99b;
    --rp-danger: #ff6b6b;
    --rp-warning: #f6c453;
    --rp-radius-sm: 10px;
    --rp-radius: 16px;
    --rp-radius-lg: 24px;
    --rp-shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.brand-lockup {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.brand-mark {
    display: inline-grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: var(--rp-mint);
    color: var(--rp-ink);
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -0.06em;
    box-shadow: 0 0 0 1px rgba(99, 242, 170, 0.25), 0 8px 26px rgba(39, 216, 137, 0.24);
}

.brand-wordmark {
    color: var(--rp-cream);
    font-size: 19px;
    font-weight: 750;
    letter-spacing: -0.045em;
}

.brand-wordmark > span {
    color: var(--rp-mint);
}

.brand-product {
    margin-left: 2px;
    padding-left: 10px;
    border-left: 1px solid var(--rp-line);
    color: var(--rp-muted);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

/* Authentication */
.auth-page,
.verification-page {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
    background:
        radial-gradient(circle at 14% 10%, rgba(39, 216, 137, 0.18), transparent 32%),
        radial-gradient(circle at 86% 88%, rgba(20, 184, 137, 0.13), transparent 30%),
        var(--rp-ink);
    color: var(--rp-copy);
}

.auth-page::before,
.verification-page::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    opacity: 0.22;
    background-image:
        linear-gradient(rgba(99, 242, 170, 0.07) 1px, transparent 1px),
        linear-gradient(90deg, rgba(99, 242, 170, 0.07) 1px, transparent 1px);
    background-size: 46px 46px;
    mask-image: linear-gradient(to bottom right, black, transparent 72%);
}

.auth-page::after {
    content: 'crawl  /  analyse  /  improve  /  repeat';
    position: fixed;
    left: 32px;
    bottom: 26px;
    color: rgba(220, 236, 228, 0.34);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
}

.auth-page .login-container,
.auth-page .register-container,
.verification-page .container {
    position: relative;
    z-index: 1;
    max-width: 460px;
    padding: 42px;
    overflow: hidden;
    border: 1px solid var(--rp-line);
    border-radius: var(--rp-radius-lg);
    background: rgba(12, 33, 27, 0.88);
    color: var(--rp-copy);
    box-shadow: var(--rp-shadow);
    backdrop-filter: blur(22px);
}

.auth-page .login-container::before,
.auth-page .register-container::before,
.verification-page .container::before {
    content: '';
    position: absolute;
    inset: 0 0 auto 0;
    height: 3px;
    background: linear-gradient(90deg, var(--rp-mint), var(--rp-teal), transparent 82%);
}

.auth-page .logo {
    margin-bottom: 34px;
    text-align: left;
}

.auth-page .logo .brand-lockup {
    margin-bottom: 30px;
}

.auth-page .logo h1 {
    margin: 0 0 10px;
    color: var(--rp-cream);
    font-size: clamp(30px, 5vw, 38px);
    font-weight: 720;
    line-height: 1.08;
    letter-spacing: -0.055em;
}

.auth-page .logo p {
    max-width: 34ch;
    color: var(--rp-muted);
    font-size: 14px;
    line-height: 1.65;
}

.auth-page label {
    margin-bottom: 9px;
    color: #cfe4d9;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.auth-page input[type='text'],
.auth-page input[type='email'],
.auth-page input[type='password'] {
    min-height: 50px;
    padding: 13px 15px;
    border: 1px solid rgba(179, 255, 218, 0.18);
    border-radius: 12px;
    background: rgba(4, 19, 15, 0.66);
    color: var(--rp-cream);
    caret-color: var(--rp-mint);
}

.auth-page input[type='text']:focus,
.auth-page input[type='email']:focus,
.auth-page input[type='password']:focus {
    border-color: var(--rp-mint);
    box-shadow: 0 0 0 4px rgba(99, 242, 170, 0.11);
}

.auth-page .input-hint {
    margin-top: 7px;
    color: #718f80;
}

.auth-page .btn,
.verification-page .button {
    min-height: 50px;
    border: 1px solid transparent;
    border-radius: 12px;
    background: var(--rp-mint);
    color: var(--rp-ink);
    font-weight: 750;
    box-shadow: 0 10px 28px rgba(39, 216, 137, 0.16);
}

.auth-page .btn:hover,
.verification-page .button:hover {
    background: #83f7bb;
    box-shadow: 0 12px 32px rgba(39, 216, 137, 0.24);
    transform: translateY(-1px);
}

.auth-page .btn-guest {
    border-color: var(--rp-line);
    background: rgba(255, 255, 255, 0.035);
    color: #c9ded3;
    box-shadow: none;
}

.auth-page .btn-guest:hover {
    border-color: rgba(99, 242, 170, 0.38);
    background: rgba(99, 242, 170, 0.07);
    box-shadow: none;
}

.auth-page .register-link,
.auth-page .login-link,
.auth-page .divider {
    color: var(--rp-muted);
}

.auth-page .register-link a,
.auth-page .login-link a {
    color: var(--rp-mint);
}

.auth-page .alert {
    border-radius: 12px;
}

.auth-page .alert-error {
    border-color: rgba(255, 107, 107, 0.28);
    background: rgba(255, 107, 107, 0.09);
    color: #ffaaaa;
}

.auth-page .alert-success,
.auth-page .alert-info {
    border-color: rgba(99, 242, 170, 0.28);
    background: rgba(99, 242, 170, 0.08);
    color: #a9f7cc;
}

/* Main crawler */
.crawler-page {
    background: var(--rp-ink);
    color: var(--rp-copy);
}

.crawler-page .app-container {
    background:
        radial-gradient(circle at 22% -10%, rgba(39, 216, 137, 0.10), transparent 32%),
        var(--rp-ink);
}

.crawler-page .header {
    padding: 13px 18px;
    border-bottom: 1px solid var(--rp-line);
    background: rgba(7, 23, 19, 0.95);
}

.crawler-page .app-title {
    display: flex;
    align-items: center;
    gap: 9px;
    color: var(--rp-cream);
}

.crawler-page .app-title::after {
    display: none;
}

.crawler-page .app-title .brand-mark {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    font-size: 15px;
}

.crawler-page .url-section {
    padding: 18px 22px;
    border-bottom: 1px solid var(--rp-line);
    background: rgba(12, 33, 27, 0.88);
}

.crawler-page .input-label,
.crawler-page .sidebar-title,
.crawler-page .tab-button.active {
    color: var(--rp-mint);
}

.crawler-page .input-label::after,
.crawler-page .app-title::after,
.crawler-page .progress-fill {
    background: var(--rp-mint);
}

.crawler-page .url-input,
.crawler-page input,
.crawler-page select,
.crawler-page textarea {
    border-color: rgba(179, 255, 218, 0.18);
    background: rgba(4, 19, 15, 0.58);
    color: var(--rp-cream);
}

.crawler-page .url-input:focus,
.crawler-page input:focus,
.crawler-page select:focus,
.crawler-page textarea:focus {
    border-color: var(--rp-mint);
    box-shadow: 0 0 0 3px rgba(99, 242, 170, 0.10);
}

.crawler-page .btn {
    min-height: 40px;
    border-radius: 10px;
    letter-spacing: 0;
}

.crawler-page .btn-primary,
.crawler-page .btn-success {
    background: var(--rp-mint);
    color: var(--rp-ink);
}

.crawler-page .btn-primary:hover,
.crawler-page .btn-success:hover {
    background: #83f7bb;
    box-shadow: 0 8px 22px rgba(39, 216, 137, 0.18);
}

.crawler-page .btn-secondary {
    border: 1px solid var(--rp-line);
    background: rgba(255, 255, 255, 0.035);
    color: #cfe1d8;
}

.crawler-page .btn-secondary:hover {
    border-color: rgba(99, 242, 170, 0.32);
    background: rgba(99, 242, 170, 0.07);
}

.crawler-page .btn-danger {
    border: 1px solid rgba(255, 107, 107, 0.25);
    background: rgba(255, 107, 107, 0.10);
    color: #ff9b9b;
}

.crawler-page .sidebar {
    border-right: 1px solid var(--rp-line);
    background: #091c17;
}

.crawler-page .sidebar-title {
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.crawler-page .filter-item:hover,
.crawler-page .filter-item.active {
    background: rgba(99, 242, 170, 0.07);
}

.crawler-page .filter-count {
    background: rgba(99, 242, 170, 0.10);
    color: #b7fbd5;
}

.crawler-page .content-area,
.crawler-page .table-container,
.crawler-page .tabs {
    background: var(--rp-ink-soft);
}

.crawler-page .tabs {
    border-bottom: 1px solid var(--rp-line);
}

.crawler-page .tab-button.active {
    border-bottom-color: var(--rp-mint);
    background: rgba(99, 242, 170, 0.06);
}

.crawler-page .data-table th {
    border-bottom-color: var(--rp-line);
    background: #123127;
    color: #9ff4c5;
}

.crawler-page .data-table td {
    border-bottom-color: rgba(179, 255, 218, 0.08);
}

.crawler-page .data-table tbody tr:hover {
    background: rgba(99, 242, 170, 0.045);
}

.crawler-page .modal-content {
    border: 1px solid var(--rp-line);
    border-radius: var(--rp-radius-lg);
    background: #0d231c;
    box-shadow: var(--rp-shadow);
}

.crawler-page .settings-tabs,
.crawler-page .modal-header,
.crawler-page .modal-footer {
    border-color: var(--rp-line);
    background: rgba(4, 19, 15, 0.36);
}

.crawler-page .settings-tab.active {
    border-color: var(--rp-mint);
    background: rgba(99, 242, 170, 0.09);
    color: var(--rp-mint);
}

.crawler-page #userInfo {
    color: var(--rp-muted) !important;
}

/* Crawl history */
.history-page {
    min-height: 100vh;
    background:
        radial-gradient(circle at 90% 0%, rgba(39, 216, 137, 0.10), transparent 34%),
        var(--rp-ink);
    color: var(--rp-copy);
}

.history-page .container {
    max-width: 1440px;
}

.history-page .header h1 {
    color: var(--rp-cream);
    letter-spacing: -0.045em;
}

.history-page .header p,
.history-page .stat-label,
.history-page .loading,
.history-page .empty-state p {
    color: var(--rp-muted);
}

.history-page .page-brand {
    margin-bottom: 22px;
}

.history-page .stat-card,
.history-page .table-container {
    border: 1px solid var(--rp-line);
    border-radius: var(--rp-radius);
    background: rgba(12, 33, 27, 0.82);
    box-shadow: 0 12px 34px rgba(0, 0, 0, 0.16);
}

.history-page .stat-value,
.history-page .empty-state h3 {
    color: var(--rp-cream);
}

.history-page th {
    background: #123127;
    color: #9ff4c5;
}

.history-page td {
    border-top-color: var(--rp-line);
}

.history-page tbody tr:hover {
    background: rgba(99, 242, 170, 0.04);
}

.history-page .url-link {
    color: var(--rp-mint);
}

.history-page .btn-primary {
    background: var(--rp-mint);
    color: var(--rp-ink);
}

.history-page .btn-secondary {
    border: 1px solid var(--rp-line);
    background: rgba(255, 255, 255, 0.045);
    color: var(--rp-copy);
}

.history-page .btn-danger {
    background: rgba(255, 107, 107, 0.12);
    color: #ffaaaa;
}

.verification-page .icon.success {
    color: var(--rp-mint);
}

.verification-page h1 {
    color: var(--rp-cream);
}

.verification-page .message,
.verification-page .auto-redirect {
    color: var(--rp-muted);
}

.verification-page .spinner {
    border-color: rgba(99, 242, 170, 0.18);
    border-top-color: var(--rp-mint);
}

@media (max-width: 900px) {
    .crawler-page .header-content {
        align-items: flex-start;
        gap: 12px;
    }

    .crawler-page .header-actions {
        flex-wrap: wrap;
        justify-content: flex-end;
    }

    .brand-product {
        display: none;
    }
}

@media (max-width: 620px) {
    .auth-page,
    .verification-page {
        align-items: flex-start;
        padding: 14px;
    }

    .auth-page .login-container,
    .auth-page .register-container,
    .verification-page .container {
        margin-top: 18px;
        padding: 30px 24px;
    }

    .auth-page::after {
        display: none;
    }

    .crawler-page .header {
        padding: 10px 12px;
    }

    .crawler-page .brand-wordmark,
    .crawler-page .brand-product {
        display: none;
    }
}
