.scf-form {
    max-width: 600px;
    margin: 1.5rem auto;
    padding: 1.5rem;
    background-color: #ffffff;
    color: #1f2937;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    box-sizing: border-box;
    text-align: left;
}

.scf-hp-field {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
}

.scf-field {
    margin-bottom: 1rem;
}

.scf-form .scf-field label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.4rem;
    color: #1f2937;
}

.scf-form .scf-required {
    color: #d63638;
    margin-left: 2px;
}

.scf-form .scf-field input[type="text"],
.scf-form .scf-field input[type="email"],
.scf-form .scf-field input[type="url"],
.scf-form .scf-field textarea {
    width: 100%;
    padding: 0.6rem 0.8rem;
    border-radius: 4px;
    border: 1px solid #ccd0d4;
    background-color: #ffffff;
    color: #1f2937;
    font-size: 14px;
    line-height: 1.4;
    box-sizing: border-box;
}

.scf-form .scf-field input[type="text"]:focus,
.scf-form .scf-field input[type="email"]:focus,
.scf-form .scf-field input[type="url"]:focus,
.scf-form .scf-field textarea:focus {
    border-color: #2271b1;
    outline: none;
    box-shadow: 0 0 0 1px #2271b1;
}

.scf-field input::placeholder,
.scf-field textarea::placeholder {
    color: #6b7280;
    opacity: 1;
}

.scf-form.scf-theme-dark {
    background-color: #16181d;
    color: #f3f4f6;
    border: 1px solid #2c303a;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.scf-form.scf-theme-dark .scf-field label {
    color: #f3f4f6;
}

.scf-form.scf-theme-dark .scf-field input[type="text"],
.scf-form.scf-theme-dark .scf-field input[type="email"],
.scf-form.scf-theme-dark .scf-field input[type="url"],
.scf-form.scf-theme-dark .scf-field textarea {
    background-color: #0f1115;
    color: #f3f4f6;
    border-color: #374151;
}

.scf-form.scf-theme-dark .scf-field input[type="text"]:focus,
.scf-form.scf-theme-dark .scf-field input[type="email"]:focus,
.scf-form.scf-theme-dark .scf-field input[type="url"]:focus,
.scf-form.scf-theme-dark .scf-field textarea:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 1px #3b82f6;
}

.scf-form .scf-links-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.scf-form .scf-link-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.scf-form .scf-link-label {
    min-width: 52px;
    font-size: 13px;
    font-weight: 600;
    color: #4b5563;
    flex-shrink: 0;
}

.scf-form .scf-link-row .scf-link-input {
    flex: 1;
}

form.scf-form .scf-remove-link-btn {
    padding: 0.45rem 0.7rem;
    border: 1px solid #d1d5db !important;
    border-radius: 4px;
    background-color: #f9fafb !important;
    color: #b91c1c !important;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    flex-shrink: 0;
}

form.scf-form .scf-remove-link-btn:hover {
    background-color: #fee2e2 !important;
    border-color: #fca5a5 !important;
}

form.scf-form .scf-add-link-btn {
    margin-top: 0.55rem;
    padding: 0.45rem 0.9rem;
    border: 1px solid #2271b1 !important;
    border-radius: 4px;
    background-color: #f0f6fc !important;
    color: #1d4ed8 !important;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
}

form.scf-form .scf-add-link-btn:hover,
form.scf-form .scf-add-link-btn:focus {
    background-color: #2271b1 !important;
    color: #ffffff !important;
}

form.scf-form .scf-add-link-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

form.scf-form .scf-math-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

form.scf-form .scf-math-question {
    display: inline-block;
    padding: 0.55rem 0.85rem;
    border-radius: 4px;
    background-color: #f3f4f6;
    border: 1px solid #d1d5db;
    color: #111827;
    font-weight: 700;
    font-size: 15px;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

form.scf-form .scf-math-row .scf-math-input {
    max-width: 120px;
}

form.scf-form .scf-math-refresh-btn {
    padding: 0.5rem 0.7rem;
    border: 1px solid #d1d5db !important;
    border-radius: 4px;
    background-color: #f9fafb !important;
    color: #374151 !important;
    font-size: 15px;
    line-height: 1;
    cursor: pointer;
}

form.scf-form .scf-math-refresh-btn:hover {
    background-color: #e5e7eb !important;
}

form.scf-form.scf-theme-dark .scf-link-label {
    color: #d1d5db;
}

form.scf-form.scf-theme-dark .scf-remove-link-btn {
    background-color: #1f2937 !important;
    border-color: #374151 !important;
    color: #fca5a5 !important;
}

form.scf-form.scf-theme-dark .scf-remove-link-btn:hover {
    background-color: #450a0a !important;
    border-color: #7f1d1d !important;
}

form.scf-form.scf-theme-dark .scf-add-link-btn {
    background-color: #1e293b !important;
    border-color: #60a5fa !important;
    color: #93c5fd !important;
}

form.scf-form.scf-theme-dark .scf-add-link-btn:hover,
form.scf-form.scf-theme-dark .scf-add-link-btn:focus {
    background-color: #3b82f6 !important;
    color: #ffffff !important;
}

form.scf-form.scf-theme-dark .scf-math-question {
    background-color: #1f2937;
    border-color: #374151;
    color: #f9fafb;
}

form.scf-form.scf-theme-dark .scf-math-refresh-btn {
    background-color: #1f2937 !important;
    border-color: #374151 !important;
    color: #e5e7eb !important;
}

form.scf-form.scf-theme-dark .scf-math-refresh-btn:hover {
    background-color: #374151 !important;
}

.scf-form.scf-theme-dark .scf-message-success {
    color: #86efac;
}

.scf-form.scf-theme-dark .scf-message-error {
    color: #fca5a5;
}

.scf-field textarea {
    resize: vertical;
    min-height: 120px;
}

.scf-button {
    display: inline-block;
    padding: 0.7rem 1.4rem;
    border-radius: 4px;
    border: none;
    background-color: #2271b1;
    color: #ffffff;
    font-weight: 600;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.15s ease, opacity 0.15s ease;
}

.scf-button:hover,
.scf-button:focus {
    background-color: #135e96;
}

.scf-button:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.scf-alert {
    margin: 1rem auto;
    max-width: 600px;
    padding: 0.9rem 1rem;
    border-radius: 4px;
    font-size: 14px;
}

.scf-alert-success {
    background-color: #edf7ed;
    border: 1px solid #b7dfb9;
    color: #246b2c;
}

.scf-alert-error {
    background-color: #fdecea;
    border: 1px solid #f5c6cb;
    color: #a71d2a;
}

.scf-message {
    margin-top: 0.8rem;
    font-size: 14px;
}

.scf-message-success {
    color: #246b2c;
}

.scf-message-error {
    color: #a71d2a;
}

@media (max-width: 600px) {
    .scf-form {
        margin: 1rem;
        padding: 1rem;
    }
}
