.ckg-page {
    width: min(100%, 1080px);
    max-width: 1080px;
    margin: 0 auto;
    padding: 40px 32px;
    box-sizing: border-box;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: #111827;
    background: #f8fafc;
    border-radius: 28px;
}

.ckg-title {
    margin-top: 0;
    margin-bottom: 28px;
    font-size: clamp(2rem, 3.4vw, 3rem);
    letter-spacing: 0.04em;
    text-transform: none;
    color: #111827;
}

.ckg-box {
    background: #ffffff;
    border: 1px solid rgba(99, 102, 241, 0.12);
    border-radius: 28px;
    padding: 28px;
    margin-bottom: 28px;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.08);
}

.ckg-login p,
.ckg-current-guess p,
.ckg-form-box p,
.ckg-chart p {
    margin: 0 0 1rem;
    color: #475569;
}

.ckg-login a.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 120px;
    width: auto;
    padding: 0.9rem 1.4rem;
    border-radius: 999px;
    font-weight: 700;
    text-decoration: none;
    border: 1px solid transparent;
    transition: transform 0.15s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.08);
}

.ckg-login a.button:hover {
    transform: translateY(-1px);
}

.ckg-login a.ckg-oauth-google {
    background: #ffffff;
    color: #202124;
    border-color: #dadce0;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
}

.ckg-login a.ckg-oauth-google:hover {
    background: #f8f9fa;
}

.ckg-login a.ckg-oauth-facebook {
    background: #1877f2;
    color: #ffffff;
    border-color: #145db3;
}

.ckg-login a.ckg-oauth-facebook:hover {
    background: #145db3;
}

.ckg-note {
    opacity: 0.9;
    font-size: 0.96rem;
    color: #64748b;
}

.ckg-form-box label,
.ckg-form-box input[type="number"],
.ckg-form-box input[type="email"],
.ckg-form-box textarea {
    display: block;
    width: 100%;
    margin-bottom: 12px;
    box-sizing: border-box;
}

.ckg-form-box label {
    font-weight: 600;
    color: #0f172a;
}

.ckg-form-box input[type="number"],
.ckg-form-box input[type="email"],
.ckg-form-box textarea {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #0f172a;
    padding: 16px 18px;
    border-radius: 16px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.ckg-form-box input[type="checkbox"] {
    width: 48px;
    height: 48px;
    min-width: 48px;
    min-height: 48px;
    margin-right: 12px;
    accent-color: #6366f1;
    vertical-align: middle;
}

.ckg-form-box label {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
}

.ckg-form-box input[type="number"]:focus,
.ckg-form-box input[type="email"]:focus,
.ckg-form-box textarea:focus {
    outline: none;
    border-color: rgba(99, 102, 241, 0.55);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.12);
}

.ckg-form-box textarea {
    min-height: 140px;
    resize: vertical;
}

.ckg-message {
    padding: 18px 20px;
    border-radius: 18px;
    font-weight: 600;
}

.ckg-success {
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.18);
    color: #1e293b;
}

.ckg-error {
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.18);
    color: #7f1d1d;
}

.ckg-chart-row {
    display: grid;
    grid-template-columns: 90px minmax(0, 1fr) 78px;
    align-items: center;
    gap: 14px;
    margin-bottom: 14px;
    min-width: 0;
}

.ckg-chart-label,
.ckg-chart-value {
    color: #475569;
    font-size: 0.95rem;
}

.ckg-chart-bar {
    display: block;
    height: 18px;
    background: linear-gradient(90deg, rgba(124, 58, 237, 1) 0%, rgba(79, 70, 229, 1) 100%);
    border-radius: 999px;
}

.ckg-entry {
    border-top: 1px solid rgba(148, 163, 184, 0.16);
    padding: 22px 0;
}

.ckg-entry:first-child {
    border-top: none;
}

.ckg-entry-heading {
    display: grid;
    grid-template-columns: 1fr 120px;
    gap: 16px;
    align-items: center;
    margin-bottom: 12px;
}

.ckg-guess-table-header {
    display: grid !important;
    grid-template-columns: 1fr 120px !important;
    gap: 16px;
    padding: 12px 0;
    border-bottom: 2px solid #e2e8f0;
    margin-bottom: 12px;
    font-weight: 700;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #64748b;
    width: 100%;
    box-sizing: border-box;
}

.ckg-guess-col-codename {
    min-width: 0;
}

.ckg-guess-col-guess {
    text-align: right;
}

.ckg-entry-reason {
    line-height: 1.8;
    margin-bottom: 10px;
    color: #334155;
}

.ckg-entry-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.92rem;
    color: #64748b;
}

.ckg-like-button {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 42px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid rgba(99, 102, 241, 0.3);
    background: #eef2ff;
    color: #312e81;
    font-size: 0.88rem;
    cursor: pointer;
    transition: background 0.15s ease, opacity 0.15s ease;
    margin: 0;
    line-height: 1;
}

.ckg-like-button:hover:not(:disabled) {
    background: rgba(99, 102, 241, 0.18);
}

.ckg-like-button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

.ckg-like-button.ckg-liked {
    background: rgba(99, 102, 241, 0.15);
    color: #4f46e5;
    border-color: rgba(99, 102, 241, 0.5);
}

.ckg-like-static {
    font-size: 0.88rem;
    color: #94a3b8;
}

.ckg-sort {
    margin-bottom: 18px;
    font-size: 0.95rem;
    color: #475569;
}

.ckg-sort a {
    color: #6366f1;
    text-decoration: none;
    margin-right: 14px;
}

.ckg-sort a.ckg-active,
.ckg-sort a:hover {
    color: #312e81;
}

.ckg-pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}

.ckg-page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    padding: 10px 14px;
    border-radius: 999px;
    border: 1px solid rgba(99, 102, 241, 0.3);
    color: #312e81;
    text-decoration: none;
    background: #eef2ff;
}

.ckg-page-link.active {
    background: rgba(99, 102, 241, 0.15);
    border-color: rgba(99, 102, 241, 0.7);
}

.ckg-box a.button,
.ckg-box .button,
.ckg-page .button,
.ckg-page a.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 12px 20px;
    font-weight: 700;
    text-decoration: none;
}

.ckg-box .button-primary,
.ckg-page .button-primary,
.ckg-box a.button-primary,
.ckg-page a.button-primary {
    background: linear-gradient(135deg, #7c3aed 0%, #4f46e5 100%);
    border-color: transparent;
    color: #ffffff;
}

.ckg-box .button-secondary,
.ckg-page .button-secondary,
.ckg-box a.button-secondary,
.ckg-page a.button-secondary {
    background: #ffffff;
    color: #4f46e5;
    border: 1px solid rgba(79, 70, 229, 0.18);
}

.ckg-box .button:hover,
.ckg-box .button-primary:hover,
.ckg-page .button-primary:hover,
.ckg-box a.button-primary:hover,
.ckg-page a.button-primary:hover {
    opacity: 0.95;
}

@media (max-width: 760px) {
    .ckg-page {
        padding: 24px 20px;
    }

    .ckg-chart-row {
        grid-template-columns: 1fr;
    }

    .ckg-entry-heading {
        flex-direction: column;
        align-items: flex-start;
    }
}
