:root {
    --primary-color: #2C3D73;
    --secondary-color: #4A90E2;
    --accent-color: #F1B352;
    --text-color: #1A1A1A;
    --text-light: #4A4A4A;
    --text-accent: #8B6B43;
    --background-color: #f4f5f7;
    --error-color: #C0392B;
    --success-color: #2E7D32;
}

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

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
    min-height: 100vh;
    min-height: 100dvh;
}

.admin-header {
    background: white;
    padding: 1rem;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.admin-logo {
    max-width: 160px;
    height: auto;
}

.admin-header h1 {
    font-size: 1.15rem;
    color: var(--text-accent);
    font-weight: 600;
    margin-top: 0.5rem;
}

.admin-main {
    max-width: 560px;
    margin: 0 auto;
    padding: 1.25rem 1rem 8rem;
}

.card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.08);
    padding: 1.25rem;
    margin-bottom: 1.25rem;
}

.hint {
    color: var(--text-light);
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

label {
    display: block;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.35rem;
}

input[type="email"],
input[type="password"],
input[type="url"] {
    width: 100%;
    padding: 0.85rem 1rem;
    font-size: 1rem;
    border: 2px solid #ddd;
    border-radius: 10px;
    margin-bottom: 1rem;
    background: white;
    color: var(--text-color);
}

input:focus {
    outline: none;
    border-color: var(--secondary-color);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 52px;
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 26px;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
    font-family: inherit;
}

.btn:active {
    transform: scale(0.98);
}

.btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.btn-primary {
    background-color: var(--accent-color);
    color: var(--primary-color);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.12);
}

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

.btn-secondary {
    background-color: var(--primary-color);
    color: white;
    width: auto;
    min-width: 96px;
}

.btn-text {
    background: none;
    color: var(--text-light);
    text-decoration: underline;
    min-height: 44px;
    margin-top: 1rem;
}

.paste-row {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
}

.paste-row input {
    flex: 1;
    margin-bottom: 0.75rem;
}

.paste-row .btn {
    min-height: 52px;
}

.posts-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.posts-head h2 {
    font-size: 1.05rem;
    color: var(--text-accent);
}

.counter {
    background: white;
    border-radius: 999px;
    padding: 0.25rem 0.85rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-light);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.posts-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.post-item {
    position: relative;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.08);
    height: 480px;
}

.post-preview {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

.post-actions {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.post-edit,
.post-remove {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: rgba(26, 26, 26, 0.75);
    color: white;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.post-edit {
    font-size: 1.15rem;
}

.post-edit:active {
    background: var(--secondary-color);
}

.post-remove:active {
    background: var(--error-color);
}

.save-bar[hidden] {
    display: none;
}

.save-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.12);
    padding: 0.6rem 1rem calc(0.6rem + env(safe-area-inset-bottom, 0px));
    display: flex;
    flex-direction: column;
    align-items: center;
}

.save-bar .btn {
    max-width: 528px;
}

.save-bar .status {
    margin: 0 0 0.5rem;
}

.error {
    color: var(--error-color);
    font-size: 0.95rem;
    margin-top: 0.75rem;
}

.status {
    margin-top: 0.9rem;
    font-size: 0.95rem;
    text-align: center;
}

.status.ok {
    color: var(--success-color);
}

.status.error {
    color: var(--error-color);
}

:focus-visible {
    outline: 3px solid var(--accent-color);
    outline-offset: 2px;
}
