:root {
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --bg: #0f0f17;
    --card-bg: #1a1a2e;
    --surface: #252542;
    --text: #e2e8f0;
    --text-muted: #94a3b8;
    --border: #2d2d44;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
}

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

body {
    font-family: 'Outfit', sans-serif;
    background: var(--bg);
    color: var(--text);
    padding: 30px;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

h1 {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

h1 a {
    text-decoration: none;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: all 0.2s ease;
}

a:hover {
    text-decoration: underline;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: 10px;
    border: none;
    font-weight: 500;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    text-decoration: none;
    font-family: inherit;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
    text-decoration: none;
}

.btn-danger {
    background: var(--danger);
    color: white;
    font-size: 0.8rem;
    padding: 8px 14px;
}

.btn-danger:hover {
    background: #dc2626;
    transform: translateY(-1px);
    text-decoration: none;
}

.btn-success {
    background: var(--success);
    color: white;
    font-size: 0.8rem;
    padding: 8px 14px;
}

.btn-success:hover {
    background: #059669;
    transform: translateY(-1px);
    text-decoration: none;
}

.btn-warning {
    background: var(--warning);
    color: #1a1a2e;
    font-size: 0.8rem;
    padding: 8px 14px;
}

.btn-warning:hover {
    background: #d97706;
    transform: translateY(-1px);
    text-decoration: none;
}

.btn-sm {
    padding: 8px 14px;
    font-size: 0.8rem;
    border-radius: 8px;
}

.message {
    padding: 14px 20px;
    border-radius: 12px;
    margin-bottom: 24px;
    font-weight: 500;
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.3);
    animation: slideDown 0.3s ease;
}

.message.error {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
    border-color: rgba(239, 68, 68, 0.3);
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--card-bg);
    padding: 24px;
    border-radius: 16px;
    text-align: center;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.15);
}

.stat-card .number {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary), #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-card .label {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 4px;
}

.form-card {
    background: var(--card-bg);
    padding: 24px;
    border-radius: 16px;
    margin-bottom: 30px;
    border: 1px solid var(--border);
}

.form-card h2 {
    font-size: 1.1rem;
    margin-bottom: 16px;
    color: var(--text);
}

.form-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

input, textarea {
    flex: 1;
    min-width: 150px;
    padding: 12px 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text);
    font-size: 0.95rem;
    font-family: inherit;
    transition: all 0.2s ease;
}

input:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

input::placeholder, textarea::placeholder {
    color: var(--text-muted);
}

textarea {
    resize: vertical;
    flex: none;
    width: 100%;
    font-family: monospace;
}

table {
    width: 100%;
    background: var(--card-bg);
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border);
}

th, td {
    padding: 16px 20px;
    text-align: left;
}

th {
    background: var(--surface);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

tr {
    border-bottom: 1px solid var(--border);
    transition: background 0.2s ease;
}

tr:last-child {
    border-bottom: none;
}

tr:hover {
    background: rgba(99, 102, 241, 0.05);
}

.link-cell a {
    color: var(--primary);
    text-decoration: none;
    font-size: 0.85rem;
    word-break: break-all;
}

.link-cell a:hover {
    text-decoration: underline;
}

.url-cell {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text-muted);
}

.actions-cell {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.actions-cell form {
    display: inline;
}

.inactive {
    opacity: 0.5;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-state svg {
    width: 64px;
    height: 64px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state p {
    font-size: 1rem;
    margin-bottom: 20px;
}

@media (max-width: 768px) {
    .form-row {
        flex-direction: column;
    }
    
    input, textarea {
        width: 100%;
    }
    
    .stats {
        grid-template-columns: 1fr;
    }
    
    table {
        font-size: 0.85rem;
    }
    
    th, td {
        padding: 12px;
    }
    
    .actions-cell {
        flex-direction: column;
    }
    
    .btn-sm {
        width: 100%;
    }
}