/* FaucetPay Faucet — Frontend Styles */

.fpf-wrap {
    --fpf-color: #6c63ff;
    --fpf-color-dark: color-mix(in srgb, var(--fpf-color) 80%, black);
    --fpf-radius: 16px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    max-width: 580px;
    margin: 0 auto;
    color: #1a1a2e;
}

/* ── Шапка ── */
.fpf-header {
    background: linear-gradient(135deg, var(--fpf-color), var(--fpf-color-dark));
    color: #fff;
    border-radius: var(--fpf-radius) var(--fpf-radius) 0 0;
    padding: 32px 28px 24px;
    text-align: center;
}

.fpf-icon { font-size: 48px; line-height: 1; margin-bottom: 8px; }

.fpf-title {
    margin: 0 0 8px;
    font-size: 24px;
    font-weight: 700;
    color: #fff !important;
}

.fpf-desc {
    margin: 0 0 16px;
    opacity: .85;
    font-size: 14px;
    line-height: 1.5;
}

.fpf-balance {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,.18);
    border-radius: 24px;
    padding: 6px 16px;
    font-size: 14px;
    font-weight: 500;
}

/* ── Бейдж награды ── */
.fpf-reward-info {
    background: #fff;
    border-left: 4px solid var(--fpf-color);
    border-right: 4px solid var(--fpf-color);
    padding: 12px 28px;
    text-align: center;
}

.fpf-reward-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: color-mix(in srgb, var(--fpf-color) 10%, white);
    color: var(--fpf-color-dark);
    border: 1px solid color-mix(in srgb, var(--fpf-color) 30%, white);
    border-radius: 20px;
    padding: 6px 18px;
    font-size: 14px;
    font-weight: 600;
}

/* ── Форма ── */
.fpf-form-wrap {
    background: #fff;
    border-left: 4px solid var(--fpf-color);
    border-right: 4px solid var(--fpf-color);
    padding: 24px 28px;
}

.fpf-field { margin-bottom: 16px; }

.fpf-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #555;
    margin-bottom: 6px;
}

.fpf-field input[type="text"] {
    width: 100%;
    box-sizing: border-box;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 14px;
    transition: border-color .2s;
    outline: none;
}

.fpf-field input[type="text"]:focus {
    border-color: var(--fpf-color);
}

.fpf-captcha {
    margin-bottom: 16px;
}

/* ── Кнопка ── */
.fpf-btn {
    width: 100%;
    padding: 14px;
    background: var(--fpf-color);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: background .2s, transform .1s;
    letter-spacing: .3px;
}

.fpf-btn:hover  { background: var(--fpf-color-dark); }
.fpf-btn:active { transform: scale(.98); }
.fpf-btn:disabled { opacity: .6; cursor: not-allowed; }

/* ── Кулдаун ── */
.fpf-cooldown-block {
    background: #fff;
    border-left: 4px solid var(--fpf-color);
    border-right: 4px solid var(--fpf-color);
    padding: 28px;
    text-align: center;
}

.fpf-cd-icon { font-size: 40px; margin-bottom: 8px; }

.fpf-cooldown-block p {
    margin: 0 0 8px;
    font-size: 14px;
    color: #666;
}

.fpf-countdown {
    font-size: 40px;
    font-weight: 800;
    color: var(--fpf-color);
    font-variant-numeric: tabular-nums;
    letter-spacing: 2px;
    margin-bottom: 16px;
}

.fpf-progress-bar {
    height: 8px;
    background: #f0f0f0;
    border-radius: 4px;
    overflow: hidden;
}

.fpf-progress-fill {
    height: 100%;
    background: var(--fpf-color);
    border-radius: 4px;
    transition: width 1s linear;
}

/* ── Сообщение ── */
.fpf-message {
    margin: 0;
    padding: 16px 20px;
    border-left: 4px solid var(--fpf-color);
    border-right: 4px solid var(--fpf-color);
    font-size: 15px;
    text-align: center;
    background: #f9f9ff;
    border-top: 1px solid #eee;
}

.fpf-message.fpf-success {
    background: #f0fff4;
    border-color: #22c55e;
    color: #15803d;
}

.fpf-message.fpf-error {
    background: #fff0f0;
    border-color: #ef4444;
    color: #b91c1c;
}

/* ── Последние выплаты ── */
.fpf-recent {
    background: #fff;
    border: 4px solid var(--fpf-color);
    border-top: none;
    border-radius: 0 0 var(--fpf-radius) var(--fpf-radius);
    padding: 20px 28px;
}

.fpf-recent h3 {
    margin: 0 0 12px;
    font-size: 15px;
    font-weight: 700;
    color: #333;
}

.fpf-recent-scroll { overflow-x: auto; }

.fpf-recent-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.fpf-recent-table th {
    text-align: left;
    padding: 6px 10px;
    background: #f8f8ff;
    color: #666;
    font-weight: 600;
    border-bottom: 2px solid #eee;
}

.fpf-recent-table td {
    padding: 8px 10px;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
}

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

.fpf-recent-table code {
    background: #f4f4f4;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12px;
}

/* ── Разное ── */
.fpf-notice {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    margin: 10px 0;
}

.fpf-error {
    background: #fff0f0;
    border: 1px solid #fca5a5;
    color: #991b1b;
}

/* ── Адаптив ── */
@media (max-width: 480px) {
    .fpf-header  { padding: 24px 16px 20px; }
    .fpf-form-wrap,
    .fpf-cooldown-block,
    .fpf-recent,
    .fpf-reward-info { padding-left: 16px; padding-right: 16px; }
    .fpf-countdown { font-size: 32px; }
}

/* ── Рекламный блок с таймером ── */
.fpf-ad-block {
    background: #fff;
    border-left: 4px solid var(--fpf-color);
    border-right: 4px solid var(--fpf-color);
    padding: 20px 28px;
    border-top: 1px solid #f0f0f0;
}

.fpf-ad-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #555;
    margin-bottom: 14px;
    padding: 8px 12px;
    background: color-mix(in srgb, var(--fpf-color) 8%, white);
    border: 1px dashed color-mix(in srgb, var(--fpf-color) 35%, white);
    border-radius: 8px;
}

.fpf-ad-icon { font-size: 18px; }

.fpf-ad-slot {
    margin-bottom: 16px;
    text-align: center;
    overflow: hidden;
    border-radius: 8px;
    min-height: 40px;
}

.fpf-ad-slot img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.fpf-ad-slot-1 { margin-bottom: 14px; }
.fpf-ad-slot-2 { margin-top: 14px; }

/* Кольцевой таймер */
.fpf-ad-timer-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 8px 0;
}

.fpf-ad-timer-ring {
    position: relative;
    width: 72px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fpf-ring-svg {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    transform: rotate(-90deg);
}

.fpf-ring-bg {
    fill: none;
    stroke: #f0f0f0;
    stroke-width: 4;
}

.fpf-ring-progress {
    fill: none;
    stroke: var(--fpf-color);
    stroke-width: 4;
    stroke-linecap: round;
    transition: stroke-dashoffset 1s linear;
}

.fpf-ad-timer-num {
    position: relative;
    z-index: 1;
    font-size: 22px;
    font-weight: 800;
    color: var(--fpf-color);
    font-variant-numeric: tabular-nums;
}

/* Кнопка: заблокирована */
.fpf-btn:disabled {
    background: #b0b0c0;
    cursor: not-allowed;
    transform: none;
}

/* Кнопка: разблокирована (анимация) */
.fpf-btn-unlocked {
    animation: fpf-pulse .5s ease;
}

@keyframes fpf-pulse {
    0%   { transform: scale(1); }
    50%  { transform: scale(1.04); box-shadow: 0 0 0 8px color-mix(in srgb, var(--fpf-color) 20%, transparent); }
    100% { transform: scale(1); }
}

/* Адаптив */
@media (max-width: 480px) {
    .fpf-ad-block { padding-left: 16px; padding-right: 16px; }
}
