:root {
    --primary-color: #313131;
    --text-color: #333;
    --bg-color: #fff;
    --border-color: #dbdbdb;
    --success-color: #00a96e;
    --error-color: #cb1919;
    --link-color: #0051c3;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
    background-color: #fff;
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding: 0;
}

.main-wrapper {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 100%;
    padding: 6rem 2rem 0; /* Top padding to push content down */
    flex: 1;
}

@media (min-width: 720px) {
    .main-wrapper {
        max-width: 720px;
        margin: 0 auto;
        padding-top: 8rem;
    }
}

.header {
    margin-bottom: 2.5rem;
}

.header h1 {
    font-size: 38px;
    font-weight: 300; /* Lighter weight for "Just a moment..." */
    line-height: 1.2;
    margin-bottom: 12px;
    color: #1d1d1d;
}

.header p {
    font-size: 15px;
    line-height: 1.6;
    color: #333;
}

#domain-name {
    font-weight: 600;
}

/* Turnstile Widget */
.cf-turnstile-wrapper {
    margin-bottom: 4rem;
    width: 300px;
}

.cf-turnstile {
    width: 300px;
    height: 65px;
    background-color: #f9f9f9;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    display: flex;
    align-items: center;
    padding: 0 16px;
    position: relative;
    user-select: none;
    box-shadow: 0 0 4px 0 rgba(0,0,0,.05);
}

.cf-checkbox-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    position: relative;
    width: 28px;
    height: 28px;
}

.cf-checkbox-wrapper input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 28px;
    height: 28px;
    border: 2px solid #c7c7c7;
    border-radius: 4px;
    background-color: #fff;
    cursor: pointer;
    outline: none;
    transition: all 0.2s ease;
    margin: 0;
}

.cf-checkbox-wrapper input[type="checkbox"]:hover {
    border-color: #a0a0a0;
}

.cf-checkbox-wrapper input[type="checkbox"]:focus {
    border-color: #4d90fe; /* Focus color */
}

/* Checked state handled by JS to hide and show spinner/success */
.cf-checkbox-wrapper input[type="checkbox"].hidden {
    display: none;
}

.cf-label {
    font-size: 14px;
    color: #1d1d1d;
    font-weight: 400;
    line-height: 1.4;
    cursor: default;
    font-family: system-ui, -apple-system, sans-serif;
}

/* Spinner */
.cf-spinner {
    display: none;
    width: 28px;
    height: 28px;
    border: 2px solid #dbdbdb;
    border-top: 2px solid #4d4d4d; /* Darker top for spinning effect */
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    position: absolute;
    left: 16px;
    box-sizing: border-box;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Success/Error Icons */
.cf-success, .cf-error {
    display: none;
    width: 28px;
    height: 28px;
    align-items: center;
    justify-content: center;
    position: absolute;
    left: 16px;
}

.cf-success svg {
    width: 28px;
    height: 28px;
    stroke: var(--success-color);
    stroke-width: 3;
}

.cf-error svg {
    width: 28px;
    height: 28px;
    stroke: var(--error-color);
}

.cf-message {
    color: var(--error-color);
    font-size: 13px;
    margin-top: 8px;
    min-height: 20px;
    padding-left: 2px;
}

/* Footer */
.footer {
    margin-top: auto; /* Push to bottom */
    width: 100%;
    border-top: 1px solid #dedede;
    padding: 20px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #555;
    background-color: #fff;
    /* Ensure footer stays at the bottom of the page content or viewport */
}

.ray-id {
    font-family: "Monaco", "Menlo", "Ubuntu Mono", "Consolas", "source-code-pro", monospace;
    color: #666;
}

.joke-text {
    color: #999;
    font-style: italic;
    margin-left: 10px;
}

/* Responsive adjustments */
@media (max-width: 600px) {
    .header h1 {
        font-size: 28px;
    }
    .footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        padding-bottom: 30px;
    }
}