:root {
    --ccfi-primary: #30EE0E;
    --ccfi-primary-dark: #25cc0b;
    --ccfi-card-bg: #ffffff;
    --ccfi-input-bg: #ebebeb;
    --ccfi-border: #000000;
    --ccfi-text-dark: #000000;
    --ccfi-shadow-black: 0 8px 30px rgba(0, 0, 0, 0.3);
    --ccfi-font: 'Arial', sans-serif;
}

/* ─── Wrapper ─────────────────────────────────────────────── */
.ccfi-hero-wrapper {
    background: transparent;
    padding: 10px 16px 30px;
    font-family: var(--ccfi-font);
    display: flex;
    justify-content: center;
    box-sizing: border-box;
    overflow: visible !important;
}

/* ─── Card ────────────────────────────────────────────────── */
.ccfi-tool-card {
    width: 100%;
    max-width: 750px;
    background: var(--ccfi-card-bg);
    border-radius: 15px;
    border: 1px solid #000;
    box-shadow: var(--ccfi-shadow-black);
    position: relative;
    z-index: 10;
}

/* ─── Header ──────────────────────────────────────────────── */
.ccfi-tool-header {
    background: var(--ccfi-primary);
    padding: 12px 20px;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    border-radius: 14px 14px 0 0;
    border-bottom: 1px solid #000;
}

.ccfi-title-group h1 {
    display: block;
    margin: 0;
    font-size: 24px;
    color: #000000;
    text-align: left;
    line-height: 1.2;
}

.ccfi-title-group p {
    display: block;
    margin: 2px 0 0;
    font-size: 14px;
    color: #000000;
    font-weight: 600;
    text-align: left;
}

/* ─── Form ────────────────────────────────────────────────── */
#ccfi-form {
    padding: 16px 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* ─── Form Row ────────────────────────────────────────────── */
.ccfi-form-row {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 0;
    width: 100%;
}

.ccfi-row-label {
    width: 100%;
    font-weight: bold;
    color: #000000;
    text-transform: uppercase;
    font-size: 12px;
    padding-right: 0;
    margin-bottom: 6px;
    box-sizing: border-box;
    text-align: left;
}

.ccfi-row-inputs {
    width: 100%;
    display: flex;
    gap: 8px;
    box-sizing: border-box;
}

.ccfi-row-inputs input[type="text"] {
    background: var(--ccfi-input-bg);
    border: 1px solid var(--ccfi-border) !important;
    border-radius: 3px;
    padding: 9px 12px;
    color: var(--ccfi-text-dark);
    font-size: 18px;
    text-transform: uppercase;
    font-weight: bold;
    letter-spacing: 2px;
    width: 100%;
    box-sizing: border-box;
    outline: none;
    font-family: var(--ccfi-font);
    height: 48px;
    text-align: center;
}

.ccfi-row-inputs input::placeholder {
    color: #999;
    font-weight: normal;
    letter-spacing: normal;
    text-transform: none;
}

/* ─── Actions ─────────────────────────────────────────────── */
.ccfi-actions {
    display: flex;
    gap: 10px;
    margin-top: 4px;
    justify-content: center;
    width: 100%;
}

#ccfi-decode-btn {
    padding: 11px 28px;
    background: #000000;
    color: #fff;
    border: 1px solid #000 !important;
    border-radius: 25px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    text-transform: uppercase;
    transition: all 0.3s ease;
    white-space: nowrap;
}

#ccfi-decode-btn:hover {
    background: var(--ccfi-primary);
    color: #000000;
}

#ccfi-reset-btn {
    padding: 11px 20px;
    background: #000;
    color: #fff;
    border: 1px solid #000 !important;
    border-radius: 25px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    text-transform: uppercase;
    white-space: nowrap;
}

/* ─── Modal ───────────────────────────────────────────────── */
.ccfi-modal {
    display: none;
    position: fixed;
    z-index: 99999;
    left: 0; top: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.7);
    align-items: center;
    justify-content: center;
}

.ccfi-modal-content {
    background: #fff;
    padding: 40px;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    text-align: center;
    transform: scale(0.8);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
}

.ccfi-modal.active { opacity: 1; }
.ccfi-modal.active .ccfi-modal-content { transform: scale(1); opacity: 1; }
.ccfi-modal-close { position: absolute; right: 20px; top: 15px; font-size: 28px; cursor: pointer; color: #000; }
.ccfi-error-modal-content { border-top: 5px solid #ff0000; }

.ccfi-result-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-top: 25px;
    text-align: left;
}

.ccfi-result-item {
    background: var(--ccfi-input-bg);
    border: 1px solid var(--ccfi-border);
    border-radius: 4px;
    padding: 10px 15px;
}

.ccfi-result-item.full-width {
    grid-column: 1 / -1;
}

.ccfi-result-label {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    color: #666;
    margin-bottom: 5px;
    font-weight: bold;
}

.ccfi-result-value {
    display: block;
    font-size: 16px;
    color: #000;
    font-weight: bold;
}

.ccfi-error { color: #ff0000; font-size: 14px; margin-top: 10px; text-align: center; }
.ccfi-error-close-btn { margin-top: 15px; padding: 10px 20px; background: #ff0000; color: #fff; border: none; border-radius: 3px; cursor: pointer; font-weight: bold; }

/* ─── Mobile (≤ 560px) ────────────────────────────────────── */
@media (max-width: 560px) {
    .ccfi-hero-wrapper {
        padding: 8px 10px 20px;
        width: 100%;
        box-sizing: border-box;
    }

    .ccfi-tool-header {
        padding: 10px 14px;
    }

    .ccfi-title-group h1 {
        font-size: 20px;
    }

    .ccfi-title-group p {
        font-size: 13px;
    }

    #ccfi-form {
        gap: 15px;
        padding: 15px;
    }

    .ccfi-actions {
        flex-direction: column;
        width: 100%;
        gap: 8px;
    }

    #ccfi-decode-btn,
    #ccfi-reset-btn {
        padding: 12px 20px;
        font-size: 14px;
        width: 100%;
        box-sizing: border-box;
    }

    .ccfi-result-grid {
        grid-template-columns: 1fr;
    }
}
