/* ByePaywall — Dark orange/blue UI */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen,
        Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
    background: #0d1117;
    color: #c9d1d9;
    min-height: 100vh;
}

/* ── Navbar ─────────────────────────────────────────────────── */

.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 1.5rem;
    background: #161b22;
    border-bottom: 1px solid #21262d;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.2rem;
    font-weight: 700;
    color: #e6edf3;
    text-decoration: none;
}

.nav-logo {
    width: 28px;
    height: 28px;
    border-radius: 4px;
    object-fit: cover;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-right a {
    color: #8b949e;
    text-decoration: none;
    font-size: 0.9rem;
}

.nav-right a:hover {
    color: #c9d1d9;
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: #c9d1d9;
    font-size: 0.9rem;
}

.nav-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
}

.nav-logout {
    color: #8b949e !important;
    background: none !important;
    border: none !important;
    cursor: pointer;
    font: inherit;
    font-size: 0.9rem;
    padding: 0;
    min-width: 0 !important;
}

.nav-logout:hover {
    color: #f59e0b !important;
}

/* ── Page content ───────────────────────────────────────────── */

.page-content {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 50px);
}

.container {
    width: 100%;
    max-width: 600px;
    padding: 2rem;
    text-align: center;
}

h1 {
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
    color: #e6edf3;
}

h2 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #e6edf3;
}

h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.8rem;
    color: #c9d1d9;
}

.accent {
    color: #58a6ff;
}

.tagline {
    color: #8b949e;
    font-size: 1rem;
    margin-bottom: 2rem;
}

.input-row {
    display: flex;
    gap: 0.5rem;
}

input[type="url"] {
    flex: 1;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border: 1px solid #30363d;
    border-radius: 8px;
    background: #161b22;
    color: #c9d1d9;
    outline: none;
    transition: border-color 0.2s;
}

input[type="url"]:focus {
    border-color: #58a6ff;
}

input[type="url"]::placeholder {
    color: #484f58;
}

input[type="url"]:disabled {
    opacity: 0.5;
}

button[type="submit"], button.btn {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    background: #d97706;
    color: #ffffff;
    cursor: pointer;
    transition: background 0.2s;
    min-width: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

button[type="submit"]:hover:not(:disabled), button.btn:hover:not(:disabled) {
    background: #b45309;
}

button[type="submit"]:disabled, button.btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.hidden {
    display: none !important;
}

.btn-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ── Bookmarklet ───────────────────────────────────────────── */

.bookmarklet {
    margin-top: 1.5rem;
}

.bookmarklet-hint {
    color: #8b949e;
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

.bookmarklet-btn {
    display: inline-block;
    padding: 0.5rem 1.2rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: #e6edf3;
    background: #30363d;
    border: 1px dashed #58a6ff;
    border-radius: 8px;
    text-decoration: none;
    cursor: grab;
    transition: background 0.2s;
}

.bookmarklet-btn:hover {
    background: #3a424c;
}

/* ── Recent URLs (home page) ────────────────────────────────── */

.recent-urls {
    margin-top: 2rem;
    text-align: left;
}

.recent-urls h3 {
    font-size: 0.85rem;
    color: #8b949e;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.recent-urls ul {
    list-style: none;
}

.recent-urls li {
    padding: 0.4rem 0;
    border-bottom: 1px solid #21262d;
    font-size: 0.9rem;
}

.recent-urls li:last-child {
    border-bottom: none;
}

.recent-urls a {
    color: #58a6ff;
    text-decoration: none;
}

.recent-urls a:hover {
    text-decoration: underline;
}

.notification {
    margin-top: 1.2rem;
    margin-bottom: 1.2rem;
    padding: 0.7rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: opacity 0.3s;
}

.notification.error {
    background: rgba(217, 119, 6, 0.15);
    color: #f59e0b;
    border: 1px solid rgba(217, 119, 6, 0.3);
}

.notification.success {
    background: rgba(88, 166, 255, 0.15);
    color: #58a6ff;
    border: 1px solid rgba(88, 166, 255, 0.3);
}

/* ── Login page ─────────────────────────────────────────────── */

.login-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.login-form input[type="text"],
.login-form input[type="password"] {
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border: 1px solid #30363d;
    border-radius: 8px;
    background: #161b22;
    color: #c9d1d9;
    outline: none;
    transition: border-color 0.2s;
}

.login-form input[type="text"]:focus,
.login-form input[type="password"]:focus {
    border-color: #58a6ff;
}

.login-form input::placeholder {
    color: #484f58;
}

.remember-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #8b949e;
    font-size: 0.9rem;
    justify-content: center;
}

.login-form button[type="submit"] {
    width: 100%;
}

/* ── Activity / admin tables ────────────────────────────────── */

.activity-page, .admin-page, .account-page {
    max-width: 900px;
    text-align: left;
}

.admin-section {
    margin-bottom: 2rem;
    padding: 1.2rem;
    background: #161b22;
    border: 1px solid #21262d;
    border-radius: 8px;
}

.activity-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 0.5rem;
    font-size: 0.9rem;
}

.activity-table th,
.activity-table td {
    padding: 0.6rem 0.8rem;
    text-align: left;
    border-bottom: 1px solid #21262d;
}

.activity-table th {
    color: #8b949e;
    font-weight: 600;
}

.activity-table td a {
    color: #58a6ff;
    text-decoration: none;
}

.activity-table td a:hover {
    text-decoration: underline;
}

.back-link {
    color: #58a6ff;
    text-decoration: none;
}

.back-link:hover {
    text-decoration: underline;
}

/* ── Admin form ─────────────────────────────────────────────── */

.admin-form .form-row {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.admin-form input[type="text"],
.admin-form input[type="password"],
.admin-form select {
    padding: 0.6rem 0.8rem;
    font-size: 0.9rem;
    border: 1px solid #30363d;
    border-radius: 6px;
    background: #0d1117;
    color: #c9d1d9;
    outline: none;
}

.admin-form input[type="text"]:focus,
.admin-form input[type="password"]:focus {
    border-color: #58a6ff;
}

.admin-form select {
    cursor: pointer;
}

.admin-form button {
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
}

/* ── Account page ───────────────────────────────────────────── */

.avatar-section {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.avatar-preview {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #30363d;
}

.avatar-placeholder {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #21262d;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    color: #8b949e;
}

.avatar-section form {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.avatar-section input[type="file"] {
    font-size: 0.85rem;
    color: #8b949e;
}

.avatar-section button {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

.password-form {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    max-width: 400px;
}

.password-form input[type="password"] {
    padding: 0.65rem 0.8rem;
    font-size: 0.95rem;
    border: 1px solid #30363d;
    border-radius: 6px;
    background: #0d1117;
    color: #c9d1d9;
    outline: none;
}

.password-form input[type="password"]:focus {
    border-color: #58a6ff;
}

.password-form input::placeholder {
    color: #484f58;
}

.password-form button {
    align-self: flex-start;
}

.pagination {
    display: flex;
    gap: 0.4rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.page-link {
    padding: 0.35rem 0.7rem;
    border: 1px solid #30363d;
    border-radius: 6px;
    color: #58a6ff;
    text-decoration: none;
    font-size: 0.85rem;
}

.page-link:hover {
    background: #30363d;
}

.page-link.active {
    background: #58a6ff;
    color: #0d1117;
    border-color: #58a6ff;
}

.btn-delete {
    background: #d97706;
    color: #ffffff;
    border: none;
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
}

.btn-delete:hover {
    background: #b45309;
}

/* ── Error page ────────────────────────────────────────────── */

.error-url {
    margin: 1rem 0 2rem;
    padding: 0.6rem 1rem;
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 6px;
    font-size: 0.85rem;
    color: #8b949e;
    word-break: break-all;
}

.site-footer {
    text-align: center;
    padding: 1.5rem 0;
    color: #484f58;
    font-size: 0.75rem;
}
