body {
    margin: 0;
    background: radial-gradient(circle at top, #c2cfdd 0%, #b9c7d7 42%, #b1c0d1 100%);
    color: #111827;
}

.site-wrapper {
    min-height: 100vh;
    padding: 32px 16px 56px;
}

.guestbook-main {
    max-width: 980px;
    margin: 0 auto;
}

.guestbook-form-container {
    max-width: 900px;
    margin: 0 auto 24px;
    border: 1px solid #dbe7f6;
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
}

.guestbook-form-container h2 {
    font-size: clamp(1.8rem, 2vw, 2.15rem);
    margin-bottom: 20px;
    color: #0f172a;
}

.guestbook-form-container .gb-field {
    margin-bottom: 18px;
}

.guestbook-form-container label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #111827;
}

.guestbook-form-container input[type="text"],
.guestbook-form-container input[type="email"],
.guestbook-form-container input[type="url"],
.guestbook-form-container textarea {
    width: 100%;
    padding: 13px 14px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    background: #f8fbff;
    color: #111827;
}

.guestbook-form-container textarea {
    min-height: 140px;
    resize: vertical;
}

.guestbook-form-container input[type="text"]:focus,
.guestbook-form-container input[type="email"]:focus,
.guestbook-form-container input[type="url"]:focus,
.guestbook-form-container textarea:focus {
    outline: none;
    border-color: #4a90e2;
    box-shadow: 0 0 0 4px rgba(74, 144, 226, 0.15);
    background: #fff;
}

.guestbook-form-container small {
    display: block;
    margin-top: 6px;
    color: #64748b;
    font-size: 0.9rem;
}

.guestbook-form-container .gb-url-counter {
    margin-top: 4px;
    font-size: 0.82rem;
    color: #475569;
}

.guestbook-form-container .gb-url-counter.is-over-limit {
    color: #b42318;
    font-weight: 700;
}

.guestbook-form-container .gb-actions input[type="submit"] {
    min-width: 160px;
    border: 0;
    border-radius: 10px;
    padding: 12px 18px;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: #fff;
    font-weight: 700;
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.22);
    transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.guestbook-form-container .gb-actions input[type="submit"]:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 28px rgba(37, 99, 235, 0.28);
    filter: brightness(1.02);
}

.guestbook-entries {
    display: grid;
    gap: 16px;
    margin-top: 18px;
}

.guestbook-entry {
    word-break: break-word;
    border: 1px solid #e5ecf6;
    border-radius: 12px;
}

.gb-alert-success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 20px;
}

.gb-alert-error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 20px;
}

.gb-admin-login {
    margin-top: 15px;
    font-size: 13px;
}

.gb-admin-form {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.gb-admin-form input[type="password"] {
    border: 1px solid #d0d0d0;
    padding: 8px 12px;
    font-size: 13px;
    border-radius: 5px;
    background-color: #f8f9fa;
    color: #000;
    transition: border-color 0.3s ease;
}

.gb-admin-form input[type="password"]:focus {
    outline: none;
    border-color: #4a90e2;
    background-color: #fff;
}

.gb-admin-status {
    font-size: 13px;
    color: #000;
    font-weight: 600;
}

.gb-entry-admin {
    float: right;
}

.gb-entry-admin a {
    color: #dc3545;
    font-weight: 600;
    text-decoration: none;
    font-size: 13px;
}

.gb-entry-admin a:hover {
    text-decoration: underline;
}

/* Engagement chart styling */
.gb-entry-chart-wrapper {
    margin-top: 16px;
    margin-bottom: 16px;
    padding: 12px 0;
    border-top: 1px solid #e9ecef;
    border-bottom: 1px solid #e9ecef;
}

.gb-chart-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #495057;
    margin-bottom: 12px;
    text-transform: capitalize;
    letter-spacing: 0.5px;
}

.gb-entry-chart {
    position: relative;
    height: 180px;
    width: 100%;
    margin-bottom: 16px;
}

.gb-chart-like-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 3;
    border: 0;
    background: transparent;
    color: #4caf50;
    border-radius: 0;
    padding: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
    cursor: pointer;
    transition: transform 0.2s ease, color 0.2s ease;
}

.gb-chart-like-btn:hover {
    transform: scale(1.04);
    color: #43a047;
}

.gb-chart-like-btn:disabled,
.gb-chart-like-btn.is-locked {
    cursor: not-allowed;
    opacity: 1;
}

.gb-chart-like-btn:disabled:hover,
.gb-chart-like-btn.is-locked:hover {
    transform: none;
    color: #388e3c;
}

.gb-chart-like-btn:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

.gb-chart-like-btn.is-liked {
    color: #388e3c;
}

.gb-thumb-icon {
    display: inline-flex;
    align-items: center;
}

.gb-thumb-icon-svg {
    width: 18px;
    height: 18px;
}

.gb-chart-like-count {
    color: #1f2937;
    font-variant-numeric: tabular-nums;
}

.gb-entry-chart .gb-chart-like-state {
    position: absolute;
    top: 28px;
    right: 8px;
    font-size: 11px;
    font-weight: 600;
    color: #2e7d32;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

.gb-entry-chart .gb-chart-like-state.is-visible {
    opacity: 1;
}

.gb-engagement-canvas {
    max-width: 100%;
    height: auto;
}

.gb-pagination-disabled {
    color: #999;
}

/* Configuration badge indicating admin password is set (non-sensitive) */
.gb-config-badge {
    display: inline-block;
    margin-top: 10px;
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
    padding: 8px 12px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 600;
}

/* General guestbook styling */
.gb-page {
    width: 100%;
    max-width: none;
    margin: 0;
}

.gb-container {
    background-color: transparent;
    display: grid;
    gap: 22px;
}

.gb-header {
    text-align: center;
    margin: 0 auto 18px;
    color: #0f172a;
    max-width: 900px;
    width: 100%;
}

.gb-header p {
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
}

.gb-kicker {
    display: inline-block;
    margin-bottom: 10px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.1);
    color: #1d4ed8;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.gb-header h1 {
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: 800;
    margin: 0 0 10px 0;
    color: #0f172a;
}

.gb-header p {
    font-size: 1.02rem;
    color: #475569;
    max-width: 640px;
    margin: 0 auto;
    line-height: 1.6;
}

.gb-link a {
    color: #4a90e2;
    text-decoration: none;
    font-weight: 500;
}

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

.gb-form-wrapper {
    background-color: #fff;
    border-radius: 8px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.gb-section-title {
    font-size: 20px;
    font-weight: 600;
    color: #000;
    margin-bottom: 20px;
}

.gb-entries-wrapper {
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
    border: 1px solid #dbe7f6;
    border-radius: 14px;
    padding: 24px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.gb-entry {
    background-color: #fff;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.07);
    transition: box-shadow 0.3s ease, transform 0.2s ease;
}

.gb-entry:hover {
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.12);
    transform: translateY(-2px);
}

.gb-entry-author {
    font-weight: 700;
    color: #0f172a;
    font-size: 1rem;
}

.gb-entry-date {
    font-size: 0.85em;
    color: #64748b;
    margin-top: 8px;
}

.gb-entry-content {
    color: #1f2937;
    margin-top: 12px;
    line-height: 1.7;
}

.gb-pagination {
    text-align: center;
    margin-top: 30px;
}

.gb-pagination a {
    color: #4a90e2;
    text-decoration: none;
    margin: 0 5px;
    font-weight: 500;
}

.gb-pagination a:hover {
    text-decoration: underline;
}

.gb-captcha-screen {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 12px;
    padding: 14px;
    background: linear-gradient(180deg, #f7fbff 0%, #edf6ff 100%);
    border: 1px solid #cfe4fb;
    border-radius: 8px;
}

.gb-captcha-screen-label {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #355c7d;
}

.gb-captcha-screen img,
.gb-captcha-screen canvas {
    display: block;
    width: 200px;
    height: 60px;
    max-width: 100%;
    border: 1px solid #b8dcff;
    border-radius: 6px;
    background: #fff;
}

@media (max-width: 480px) {
    .gb-captcha-screen img,
    .gb-captcha-screen canvas {
        width: 100%;
        max-width: 200px;
        height: auto;
    }
}

.gb-captcha-refresh {
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    background: #0b5394;
    border: none;
    border-radius: 6px;
    padding: 8px 12px;
    cursor: pointer;
}

.gb-captcha-refresh:hover,
.gb-captcha-refresh:focus {
    background: #083d6e;
}

.gb-captcha-error {
    min-height: 18px;
    font-size: 13px;
    font-weight: 600;
    color: #b42318;
}

#guestbook-rate-limit-status {
    margin-top: 10px;
    min-height: 20px;
    font-size: 13px;
    font-weight: 600;
    color: #0b5394;
    background: #e7f3ff;
    border: 1px solid #b8dcff;
    border-radius: 6px;
    padding: 8px 10px;
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.25s ease, transform 0.25s ease, max-height 0.25s ease, padding 0.25s ease, margin-top 0.25s ease;
    max-height: 60px;
    overflow: hidden;
}

#guestbook-rate-limit-status::before {
    content: "\23F1\0020";
}

#guestbook-rate-limit-status.is-hidden {
    display: none;
    opacity: 0;
    transform: translateY(-4px);
    max-height: 0;
    margin-top: 0;
    padding-top: 0;
    padding-bottom: 0;
    border-width: 0;
}

.gb-actions input[type="submit"]:disabled,
.gb-actions button[type="submit"]:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    filter: saturate(0.7);
}

.gb-no-entries {
    text-align: center;
    font-size: 0.98rem;
}

@media (max-width: 640px) {
    .site-wrapper {
        padding: 20px 12px 40px;
    }

    .gb-header h1 {
        font-size: 1.9rem;
    }

    .gb-entries-wrapper {
        padding: 16px;
    }

    .guestbook-form-container .gb-actions input[type="submit"] {
        width: 100%;
    }
}