* { box-sizing: border-box; }

body {
    font-family: -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    background: #f4f5f7;
    margin: 0;
    padding: 40px 16px;
}

.container {
    max-width: 480px;
    margin: 0 auto;
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

.container.wide { max-width: 800px; }

h1 {
    font-size: 22px;
    margin-top: 0;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.topbar h1 { margin-bottom: 0; }

.topbar nav a {
    margin-left: 12px;
    color: #2563eb;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
}

.manage-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.manage-table th, .manage-table td {
    text-align: left;
    padding: 10px;
    border-bottom: 1px solid #eee;
}

.manage-table td.truncate {
    max-width: 320px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.manage-table .actions a, .manage-table .actions button {
    width: auto;
    display: inline-block;
    margin-right: 8px;
    padding: 6px 10px;
    font-size: 13px;
}

.manage-table .actions a {
    color: #2563eb;
    text-decoration: none;
    font-weight: 600;
}

.delete-btn {
    background: #b91c1c;
}

.tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.tab-btn {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 8px;
    background: #eee;
    cursor: pointer;
    font-weight: 600;
}

.tab-btn.active {
    background: #2563eb;
    color: #fff;
}

.tab-content { display: none; }
.tab-content.active { display: block; }

label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    font-size: 14px;
}

input[type="text"], input[type="url"] {
    width: 100%;
    padding: 10px;
    margin-bottom: 12px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 14px;
}

button {
    width: 100%;
    padding: 10px;
    border: none;
    border-radius: 8px;
    background: #2563eb;
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    font-size: 14px;
}

button:disabled { opacity: 0.6; cursor: default; }

.result { margin-top: 20px; text-align: center; }
.result.hidden { display: none; }
.result img { display: block; margin: 0 auto 12px; border: 1px solid #eee; border-radius: 8px; }
.result a#static-download,
.result a#dynamic-download {
    display: inline-block;
    margin-bottom: 12px;
    color: #2563eb;
    text-decoration: none;
    font-weight: 600;
}

.hint { color: #666; font-size: 13px; margin-bottom: 16px; }
.warning { color: #b45309; font-size: 13px; }
.success { color: #15803d; font-weight: 600; }
.error { color: #b91c1c; font-weight: 600; }
