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

body {
    font-family: 'Segoe UI', sans-serif;
    background: #0f0f1a;
    color: #e0e0e0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
header {
    background: #1a1a2e;
    border-bottom: 1px solid #2a2a4a;
    padding: 1rem 2rem;
}
.header-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.logo {
    color: #7b8cde;
    font-size: 1.3rem;
    font-weight: bold;
    text-decoration: none;
}
.admin-link {
    color: #aaa;
    font-size: 0.9rem;
    text-decoration: none;
}
.admin-link:hover { color: #7b8cde; }

/* Main */
main { flex: 1; max-width: 1100px; margin: 2rem auto; padding: 0 1.5rem; width: 100%; }

/* Footer */
footer { text-align: center; padding: 1.5rem; color: #555; font-size: 0.8rem; }

/* Hero */
.hero {
    text-align: center;
    padding: 5rem 1rem;
}
.hero h1 { font-size: 3rem; color: #7b8cde; margin-bottom: 1rem; }
.hero p { font-size: 1.1rem; color: #aaa; margin-bottom: 2rem; }

/* Cards */
.card {
    background: #1a1a2e;
    border: 1px solid #2a2a4a;
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}
.card h2 { font-size: 1.1rem; margin-bottom: 1.25rem; color: #ccc; }

/* Admin */
.admin-wrap { max-width: 1100px; }
.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}
.admin-header h1 { font-size: 1.8rem; }

/* Form */
.create-form { display: flex; flex-direction: column; gap: 1rem; }
.form-row { display: flex; gap: 1rem; flex-wrap: wrap; }
.form-row label {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    flex: 1;
    font-size: 0.85rem;
    color: #aaa;
    min-width: 200px;
}
.form-row input {
    padding: 0.6rem 0.9rem;
    background: #0f0f1a;
    border: 1px solid #2a2a4a;
    border-radius: 6px;
    color: #e0e0e0;
    font-size: 0.95rem;
}
.form-row input:focus {
    outline: none;
    border-color: #7b8cde;
}
.form-actions { display: flex; align-items: flex-end; }

/* Buttons */
.btn {
    background: #7b8cde;
    color: #0f0f1a;
    padding: 0.6rem 1.25rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    font-size: 0.9rem;
    text-decoration: none;
    display: inline-block;
}
.btn:hover { background: #9aaae8; }
.btn-sm {
    padding: 0.3rem 0.75rem;
    background: #2a2a4a;
    color: #ccc;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.82rem;
    text-decoration: none;
    display: inline-block;
}
.btn-sm:hover { background: #3a3a5a; }
.btn-sm.danger { background: #3a1a1a; color: #e94560; }
.btn-sm.danger:hover { background: #4a2a2a; }
.btn-copy {
    background: #2a2a4a;
    color: #7b8cde;
    border: none;
    border-radius: 4px;
    padding: 0.2rem 0.5rem;
    font-size: 0.75rem;
    cursor: pointer;
    margin-left: 0.5rem;
}
.btn-copy:hover { background: #3a3a5a; }

/* Table */
.links-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}
.links-table th {
    text-align: left;
    padding: 0.6rem 0.75rem;
    border-bottom: 1px solid #2a2a4a;
    color: #888;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.links-table td {
    padding: 0.75rem;
    border-bottom: 1px solid #1e1e35;
    vertical-align: middle;
}
.links-table a { color: #7b8cde; text-decoration: none; }
.links-table a:hover { text-decoration: underline; }
.truncate { max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.clicks { text-align: center; font-weight: bold; color: #7b8cde; }
.empty { color: #555; font-style: italic; }

/* Login */
.login-wrap {
    max-width: 360px;
    margin: 8rem auto;
    text-align: center;
}
.login-wrap h1 { margin-bottom: 1.5rem; }
.login-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.login-form input {
    padding: 0.75rem 1rem;
    background: #1a1a2e;
    border: 1px solid #2a2a4a;
    border-radius: 6px;
    color: #e0e0e0;
    font-size: 1rem;
    text-align: center;
}
.error { color: #e94560; margin-bottom: 1rem; }

/* Toast */
#copy-toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: #7b8cde;
    color: #0f0f1a;
    padding: 0.6rem 1.5rem;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.9rem;
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
}
#copy-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}