/* Kuber Plus Challenge Plugin - Styles */
:root {
    --kc-bg: #0a0f1e;
    --kc-card: #111827;
    --kc-border: #1e2d45;
    --kc-accent: #f59e0b;
    --kc-blue: #3b82f6;
    --kc-purple: #8b5cf6;
    --kc-green: #10b981;
    --kc-text: #f1f5f9;
    --kc-muted: #64748b;
    --kc-surface: #1a2540;
    --kc-radius: 16px;
}

.kc-wrap {
    max-width: 520px;
    margin: 0 auto;
    font-family: 'Segoe UI', -apple-system, sans-serif;
    color: var(--kc-text);
    padding: 0 0 40px;
}

/* ---- Header ---- */
.kc-header {
    background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 100%);
    border-radius: 0 0 24px 24px;
    padding: 20px 20px 16px;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--kc-accent);
}
.kc-header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}
.kc-logo { font-size: 18px; font-weight: 800; color: var(--kc-accent); }
.kc-user { font-size: 13px; color: var(--kc-muted); }
.kc-user strong { color: var(--kc-text); }
.kc-stats-bar {
    display: flex;
    align-items: center;
    background: rgba(255,255,255,0.05);
    border-radius: 12px;
    padding: 12px;
    gap: 12px;
}
.kc-stat { text-align: center; flex: 1; }
.kc-stat-num { display: block; font-size: 22px; font-weight: 900; color: var(--kc-accent); }
.kc-stat-label { font-size: 11px; color: var(--kc-muted); }
.kc-stat-divider { width: 1px; height: 30px; background: var(--kc-border); }

/* ---- Sections ---- */
.kc-section { padding: 0 16px; margin-bottom: 20px; }
.kc-section-title { font-size: 16px; font-weight: 700; margin: 0 0 12px; color: var(--kc-text); }

/* ---- Active Challenge ---- */
.kc-active-badge {
    background: linear-gradient(90deg, var(--kc-accent), #f97316);
    color: #000;
    font-weight: 800;
    font-size: 12px;
    padding: 6px 14px;
    border-radius: 999px;
    display: inline-block;
    margin-bottom: 12px;
    letter-spacing: 0.5px;
}
.kc-challenge-card {
    background: var(--kc-card);
    border: 1px solid var(--kc-border);
    border-radius: var(--kc-radius);
    padding: 20px;
}
.kc-challenge-card.active-card { border-color: var(--kc-accent) + '44'; }
.kc-challenge-type {
    font-size: 13px;
    font-weight: 700;
    color: var(--kc-blue);
    margin-bottom: 10px;
}
.kc-target-display { text-align: center; margin: 10px 0 16px; }
.kc-target-label { font-size: 12px; color: var(--kc-muted); }
.kc-target-amount { font-size: 36px; font-weight: 900; color: var(--kc-accent); }
.kc-info-row {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}
.kc-info-item {
    flex: 1;
    background: var(--kc-surface);
    border-radius: 10px;
    padding: 10px 8px;
    text-align: center;
}
.kc-info-val { font-size: 15px; font-weight: 700; color: var(--kc-text); }
.kc-info-key { font-size: 10px; color: var(--kc-muted); margin-top: 2px; }
.kc-start-date {
    font-size: 12px;
    color: var(--kc-muted);
    margin-bottom: 16px;
    text-align: center;
}
.kc-start-date strong { color: var(--kc-text); }

/* ---- Progress Bars ---- */
.kc-progress-section { margin-bottom: 14px; }
.kc-progress-label {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--kc-muted);
    margin-bottom: 6px;
}
.kc-progress-track {
    background: var(--kc-surface);
    border-radius: 999px;
    height: 12px;
    overflow: hidden;
    position: relative;
}
.kc-progress-fill {
    height: 100%;
    border-radius: 999px;
    transition: width 1.2s cubic-bezier(0.4,0,0.2,1);
}
.time-fill {
    background: linear-gradient(90deg, #3b82f688, var(--kc-blue));
    box-shadow: 0 0 10px var(--kc-blue) + '55';
}
.balance-fill {
    background: linear-gradient(90deg, #10b98188, var(--kc-green));
    box-shadow: 0 0 10px var(--kc-green) + '55';
}
.kc-progress-sub { font-size: 11px; color: var(--kc-muted); margin-top: 4px; text-align: right; }

/* ---- Milestones ---- */
.kc-milestones {
    background: var(--kc-surface);
    border-radius: 12px;
    padding: 14px;
    margin: 16px 0;
}
.kc-milestone-title { font-size: 13px; font-weight: 700; margin-bottom: 10px; }
.kc-milestone {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid var(--kc-border);
    opacity: 0.6;
    transition: opacity 0.3s;
}
.kc-milestone:last-child { border-bottom: none; }
.kc-milestone.reached { opacity: 1; }
.kc-ms-icon { font-size: 20px; width: 28px; text-align: center; }
.kc-ms-info { flex: 1; }
.kc-ms-label { font-size: 11px; color: var(--kc-muted); }
.kc-ms-amount { font-size: 14px; font-weight: 700; }
.kc-ms-time { font-size: 10px; color: var(--kc-accent); font-weight: 600; text-align: right; }
.kc-ms-check { font-size: 16px; }

/* ---- Buttons ---- */
.kc-btn {
    display: block;
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s;
    text-decoration: none;
    box-sizing: border-box;
    margin-top: 16px;
}
.kc-start-btn {
    background: linear-gradient(135deg, var(--kc-accent), #f97316);
    color: #000;
}
.kc-start-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(245,158,11,0.4); }
.kc-start-btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; box-shadow: none; }
.kc-complete-btn {
    background: linear-gradient(135deg, var(--kc-green), #059669);
    color: #fff;
}
.kc-complete-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(16,185,129,0.4); }

/* ---- Form ---- */
.kc-form-card {
    background: var(--kc-card);
    border: 1px solid var(--kc-border);
    border-radius: var(--kc-radius);
    padding: 20px;
}
.kc-form-title { font-size: 18px; font-weight: 800; margin: 0 0 16px; }
.kc-field-group { margin-bottom: 18px; }
.kc-label { display: block; font-size: 13px; color: var(--kc-muted); margin-bottom: 8px; font-weight: 600; }
.kc-input {
    width: 100%;
    background: var(--kc-surface);
    border: 1px solid var(--kc-border);
    border-radius: 10px;
    color: var(--kc-text);
    padding: 12px 14px;
    font-size: 15px;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.2s;
}
.kc-input:focus { border-color: var(--kc-accent); }
.kc-input::placeholder { color: var(--kc-muted); }
.kc-range { width: 100%; margin-top: 8px; accent-color: var(--kc-purple); }
.kc-range-labels { display: flex; justify-content: space-between; font-size: 11px; color: var(--kc-muted); }

/* ---- Type Tabs ---- */
.kc-type-tabs { display: flex; gap: 10px; }
.kc-type-btn {
    flex: 1;
    background: var(--kc-surface);
    border: 2px solid var(--kc-border);
    border-radius: 12px;
    padding: 14px 8px;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s;
    color: var(--kc-text);
}
.kc-type-btn.active {
    border-color: var(--kc-accent);
    background: rgba(245,158,11,0.08);
}
.kc-type-icon { display: block; font-size: 22px; margin-bottom: 4px; }
.kc-type-name { display: block; font-size: 13px; font-weight: 700; }
.kc-type-sub { display: block; font-size: 10px; color: var(--kc-muted); margin-top: 2px; }

/* ---- Preset Buttons ---- */
.kc-preset-btns { display: flex; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.kc-preset {
    padding: 8px 14px;
    border-radius: 8px;
    border: 1px solid var(--kc-border);
    background: var(--kc-surface);
    color: var(--kc-muted);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}
.kc-preset.active, .kc-preset:hover {
    border-color: var(--kc-accent);
    color: var(--kc-accent);
    background: rgba(245,158,11,0.08);
}

/* ---- Amount Display ---- */
.kc-amount-display {
    text-align: center;
    font-size: 22px;
    font-weight: 900;
    color: var(--kc-accent);
    margin-top: 8px;
    min-height: 30px;
}

/* ---- Preview Box ---- */
.kc-preview-box {
    background: var(--kc-surface);
    border: 1px solid var(--kc-border);
    border-radius: 12px;
    padding: 14px;
    margin: 10px 0;
}
.kc-preview-title { font-size: 12px; font-weight: 700; color: var(--kc-muted); margin-bottom: 8px; }
.kc-preview-item { display: flex; justify-content: space-between; font-size: 13px; padding: 4px 0; }
.kc-preview-item span:last-child { font-weight: 700; color: var(--kc-accent); }

/* ---- Notices ---- */
.kc-notice {
    background: rgba(59,130,246,0.1);
    border: 1px solid rgba(59,130,246,0.3);
    border-radius: 10px;
    padding: 12px;
    font-size: 12px;
    color: #93c5fd;
    line-height: 1.6;
    margin-top: 12px;
}
.kc-notice-purple {
    background: rgba(139,92,246,0.1);
    border-color: rgba(139,92,246,0.3);
    color: #c4b5fd;
}

/* ---- Messages ---- */
.kc-msg { margin-top: 12px; font-size: 13px; font-weight: 600; text-align: center; min-height: 20px; }
.kc-msg.success { color: var(--kc-green); }
.kc-msg.error { color: #f87171; }

/* ---- Completed Cards ---- */
.kc-completed-card {
    background: var(--kc-card);
    border: 1px solid var(--kc-border);
    border-radius: 12px;
    padding: 14px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}
.kc-cc-type { font-size: 12px; color: var(--kc-muted); }
.kc-cc-target { font-size: 18px; font-weight: 800; color: var(--kc-green); }
.kc-cc-date { font-size: 12px; color: var(--kc-green); font-weight: 600; text-align: right; }
.kc-cc-deposit { font-size: 12px; color: var(--kc-muted); text-align: right; }

/* ---- Login Notice ---- */
.kc-login-notice {
    background: var(--kc-card);
    border: 1px solid var(--kc-border);
    border-radius: var(--kc-radius);
    padding: 40px 24px;
    text-align: center;
    margin: 20px 16px;
}
.kc-icon { font-size: 40px; margin-bottom: 12px; }
.kc-login-notice h3 { font-size: 18px; margin: 0 0 8px; }
.kc-login-notice p { color: var(--kc-muted); font-size: 14px; margin: 0 0 16px; }
.kc-login-notice .kc-btn {
    display: inline-block;
    width: auto;
    padding: 12px 28px;
    background: var(--kc-accent);
    color: #000;
    text-decoration: none;
}

/* ---- Welcome ---- */
.kc-welcome-msg { text-align: center; padding: 16px; }
.kc-welcome-icon { font-size: 36px; margin-bottom: 8px; }
.kc-welcome-text { font-size: 15px; color: var(--kc-muted); }
.kc-success-prev {
    background: rgba(16,185,129,0.1);
    border: 1px solid rgba(16,185,129,0.3);
    border-radius: 12px;
    padding: 14px;
    font-size: 13px;
    color: #6ee7b7;
    margin-bottom: 14px;
    text-align: center;
}
