/* CYDI Social Challenge Manager v2.1 – Public */

.cydi-scm-form-wrapper {
    max-width: 580px;
    margin: 2.5rem auto;
    padding: 0;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(15, 23, 42, 0.1);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    overflow: hidden;
}

.cydi-form-header {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: #fff;
    padding: 1.75rem 2rem 1.5rem;
    text-align: center;
}

.cydi-form-badge {
    display: inline-block;
    background: rgba(255,255,255,0.2);
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 0.6rem;
}

.cydi-form-title {
    margin: 0 0 0.4rem;
    font-size: 1.55rem;
    font-weight: 700;
    color: #fff;
}

.cydi-form-subtitle {
    margin: 0;
    font-size: 0.95rem;
    opacity: 0.9;
    line-height: 1.4;
}

#cydi-register-form {
    padding: 1.75rem 2rem 2rem;
}

.cydi-fields-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0 4%;
}

.cydi-field {
    margin-bottom: 1.15rem;
    width: 100%;
}

.cydi-field-half {
    width: 48%;
}

.cydi-field label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.4rem;
    color: #1e293b;
    font-size: 0.9rem;
}

.cydi-field input[type="text"],
.cydi-field input[type="email"],
.cydi-field input[type="tel"],
.cydi-field input[type="number"],
.cydi-field input[type="date"],
.cydi-field select,
.cydi-field textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    font-size: 1rem;
    color: #0f172a;
    background: #f8fafc;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.cydi-field input:hover,
.cydi-field select:hover,
.cydi-field textarea:hover {
    border-color: #cbd5e1;
    background: #fff;
}

.cydi-field input:focus,
.cydi-field select:focus,
.cydi-field textarea:focus {
    outline: none;
    border-color: #4f46e5;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.12);
}

.cydi-options-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.25rem;
}

.cydi-radio, .cydi-checkbox {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 400;
    color: #334155;
    cursor: pointer;
}

.cydi-location-note {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    background: #f1f5f9;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    color: #64748b;
    font-size: 0.85rem;
    margin-bottom: 1.25rem;
}

.cydi-loc-icon { font-size: 1rem; line-height: 1.3; }

.cydi-submit-wrap { margin-bottom: 0; }

.cydi-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.85rem 1.6rem;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
}

.cydi-btn:hover { transform: translateY(-1px); }
.cydi-btn:active { transform: translateY(0); }

.cydi-btn-primary {
    background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
    color: #fff;
    width: 100%;
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.35);
}

.cydi-btn-primary:hover {
    background: linear-gradient(135deg, #4338ca 0%, #4f46e5 100%);
    box-shadow: 0 6px 18px rgba(79, 70, 229, 0.4);
}

.cydi-btn-primary:disabled {
    background: #a5b4fc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.cydi-btn-copy {
    background: #475569;
    color: #fff;
    padding: 0.65rem 1.1rem;
    white-space: nowrap;
    border-radius: 8px;
}

.cydi-btn-whatsapp { background: #25d366; color: #fff; }
.cydi-btn-facebook { background: #1877f2; color: #fff; }
.cydi-btn-x { background: #0f172a; color: #fff; }

.cydi-messages {
    margin: 1rem 2rem 0;
    padding: 0.9rem 1.1rem;
    border-radius: 10px;
    font-size: 0.95rem;
    line-height: 1.45;
}

.cydi-messages.error {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.cydi-messages.success {
    background: #f0fdf4;
    color: #15803d;
    border: 1px solid #bbf7d0;
}

.cydi-success-screen {
    text-align: center;
    padding: 2rem 2rem 2.5rem;
}

.cydi-success-icon { font-size: 3.2rem; margin-bottom: 0.5rem; }

.cydi-success-screen h2 {
    margin: 0 0 0.5rem;
    color: #1e293b;
    font-size: 1.5rem;
}

.cydi-welcome { font-size: 1.1rem; color: #475569; margin-bottom: 1.5rem; }

.cydi-id-box, .cydi-link-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.1rem 1.25rem;
    margin-bottom: 1.1rem;
    text-align: left;
}

.cydi-label {
    display: block;
    font-size: 0.75rem;
    color: #64748b;
    margin-bottom: 0.35rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.cydi-id {
    font-size: 1.6rem;
    color: #4f46e5;
    letter-spacing: 0.04em;
    font-weight: 700;
}

.cydi-link-row { display: flex; gap: 0.5rem; }

.cydi-link-row input {
    flex: 1;
    padding: 0.65rem 0.9rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.9rem;
    background: #fff;
    color: #334155;
}

.cydi-share-text {
    color: #64748b;
    font-size: 0.95rem;
    margin: 1.25rem 0 1rem;
}

.cydi-share-buttons {
    display: flex;
    gap: 0.6rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.cydi-share-buttons .cydi-btn { min-width: 110px; border-radius: 8px; }

.cydi-referral-count {
    font-size: 1.05rem;
    color: #334155;
    margin: 0;
}

.cydi-leaderboard, .cydi-public-stats { max-width: 1100px; margin: 2rem auto; }

.cydi-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.cydi-table th, .cydi-table td {
    padding: 0.85rem 1rem;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

.cydi-table th {
    background: #f1f5f9;
    font-weight: 600;
    color: #334155;
}

.cydi-table tr:last-child td { border-bottom: none; }

.cydi-table code {
    background: #e0e7ff;
    color: #4338ca;
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-size: 0.9rem;
}

.cydi-participant-dashboard {
    max-width: 560px;
    margin: 2rem auto;
    padding: 2rem;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(15, 23, 42, 0.1);
}

.cydi-tree {
    list-style: none;
    padding-left: 1.2rem;
    border-left: 2px solid #c7d2fe;
}

.cydi-tree li { margin: 0.4rem 0; }

.cydi-tree-node code {
    background: #e0e7ff;
    color: #4338ca;
    padding: 0.1rem 0.35rem;
    border-radius: 4px;
    font-size: 0.85rem;
}

.cydi-stats-summary {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.cydi-stat-box {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: #fff;
    padding: 1.2rem 1.8rem;
    border-radius: 12px;
    text-align: center;
    min-width: 140px;
}

.cydi-stat-box span { display: block; font-size: 2rem; font-weight: 700; }
.cydi-stat-box small { opacity: 0.9; font-size: 0.85rem; }

.cydi-map-chart-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.cydi-map-container, .cydi-chart-container, .cydi-lga-table-wrap {
    background: #fff;
    padding: 1.25rem;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.cydi-map-note { font-size: 0.85rem; color: #64748b; margin-bottom: 0.75rem; }

@media (max-width: 800px) {
    .cydi-map-chart-grid { grid-template-columns: 1fr; }
    .cydi-field-half { width: 100%; }
}

@media (max-width: 480px) {
    .cydi-form-header { padding: 1.4rem 1.25rem 1.2rem; }
    #cydi-register-form { padding: 1.25rem; }
    .cydi-form-title { font-size: 1.3rem; }
}
