* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body.dark {
    background: radial-gradient(circle at top, #1e293b 0, #020617 55%, #000 100%);
    color: #e5e7eb;
}

a {
    color: #38bdf8;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px;
    background: rgba(15, 23, 42, 0.9);
    border-bottom: 1px solid #111827;
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 20;
}

.logo {
    font-weight: 600;
    letter-spacing: 0.04em;
}

.logo-accent {
    color: #22c55e;
}

.topbar nav a {
    margin-left: 12px;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 0.9rem;
}

.btn-primary {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: #020617;
    font-weight: 600;
}

.btn-primary:hover {
    filter: brightness(1.1);
}

.btn-out {
    border: 1px solid #4b5563;
}

.page {
    max-width: 960px;
    margin: 40px auto;
    padding: 0 16px 40px;
}

.card {
    background: radial-gradient(circle at top left, rgba(148, 163, 184, 0.15) 0, rgba(15, 23, 42, 0.95) 55%);
    border-radius: 18px;
    padding: 26px 24px 24px;
    border: 1px solid rgba(31, 41, 55, 0.9);
    box-shadow: 0 20px 45px rgba(15, 23, 42, 0.9);
}

.card h1, .card h2 {
    margin-bottom: 10px;
}

.card p.subtitle {
    color: #9ca3af;
    margin-bottom: 18px;
    font-size: 0.95rem;
}

.form-group {
    margin-bottom: 16px;
}

label {
    display: block;
    font-size: 0.9rem;
    margin-bottom: 4px;
    color: #9ca3af;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="url"] {
    width: 100%;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid #1f2933;
    background: rgba(15, 23, 42, 0.8);
    color: #e5e7eb;
    outline: none;
}

input:focus {
    border-color: #22c55e;
    box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.4);
}

.btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 10px 18px;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
}

.btn-lg {
    padding: 12px 20px;
    font-size: 1rem;
}

.btn-success {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: #020617;
}

.btn-secondary {
    background: #111827;
    color: #e5e7eb;
}

.alert {
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.alert-error {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(248, 113, 113, 0.5);
    color: #fecaca;
}

.alert-success {
    background: rgba(34, 197, 94, 0.18);
    border: 1px solid rgba(74, 222, 128, 0.6);
    color: #bbf7d0;
}

.footer {
    text-align: center;
    padding: 18px 0 26px;
    font-size: 0.8rem;
    color: #6b7280;
}

/* Dashboard */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
}

.links-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 16px;
    font-size: 0.9rem;
}

.links-table th,
.links-table td {
    padding: 8px 6px;
    border-bottom: 1px solid #1f2933;
    text-align: left;
}

.links-table th {
    color: #9ca3af;
    font-weight: 500;
}

/* Modal */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 40;
}

.modal {
    width: 100%;
    max-width: 430px;
    background: #020617;
    border-radius: 18px;
    padding: 22px 20px 18px;
    border: 1px solid #1f2933;
    box-shadow: 0 25px 50px rgba(0,0,0,0.8);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.modal-header h2 {
    font-size: 1.05rem;
}

.modal-close {
    cursor: pointer;
    color: #6b7280;
    font-size: 1.2rem;
}

/* Auth center */
.auth-wrapper {
    max-width: 420px;
    margin: 0 auto;
    margin-top: 40px;
}
