* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Segoe UI", sans-serif;
    background: linear-gradient(180deg, #f5f7fb 0%, #eef2f9 100%);
    color: #22314a;
}

.page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px 20px 48px;
}

.hero,
.panel {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid #d9e3f2;
    border-radius: 24px;
    box-shadow: 0 18px 48px rgba(54, 71, 96, 0.08);
}

.hero {
    padding: 28px;
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: center;
}

.eyebrow {
    margin: 0 0 8px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #7a58ff;
    font-weight: 700;
    font-size: 12px;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

.lead {
    max-width: 700px;
    margin-bottom: 0;
    color: #52627f;
}

.api-link,
button {
    border: 0;
    border-radius: 14px;
    background: linear-gradient(135deg, #8b35ff 0%, #5d5fef 100%);
    color: white;
    padding: 12px 18px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
}

.panel {
    margin-top: 24px;
    padding: 24px;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

label {
    display: flex;
    flex-direction: column;
    gap: 8px;
    color: #4c5d79;
    font-size: 14px;
}

input {
    width: 100%;
    border: 1px solid #c7d5ea;
    border-radius: 12px;
    padding: 12px 14px;
    font: inherit;
}

.message {
    min-height: 24px;
    margin: 16px 0 0;
    font-weight: 600;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    margin-bottom: 18px;
}

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 18px;
}

.card {
    background: #fff;
    border: 1px solid #d8e2f1;
    border-radius: 18px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.preview {
    width: 100%;
    height: 220px;
    object-fit: cover;
    background: #edf2fa;
}

.card-body {
    padding: 16px;
}

.title {
    margin-bottom: 8px;
}

.meta {
    color: #667792;
    font-size: 14px;
}

.url-field {
    margin-top: 8px;
    margin-bottom: 12px;
    background: #f8fbff;
}

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

.danger {
    background: linear-gradient(135deg, #ef5350 0%, #d32f2f 100%);
}

.edit-form {
    margin-top: 16px;
    display: grid;
    gap: 12px;
}

.hidden {
    display: none;
}

@media (max-width: 700px) {
    .hero,
    .panel-header {
        flex-direction: column;
        align-items: stretch;
    }

    .api-link,
    button {
        width: 100%;
        text-align: center;
    }
}
