/* Контейнер */
.mcf-container {
    max-width: 420px;
    margin: 20px auto;
    padding: 24px;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,.12);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    position: relative;
    color: #fff;
}

/* Заголовок */
.mcf-title {
    font-size: 18px;
    font-weight: 600;
    text-align: center;
    margin: 0 0 20px;
    color: #fff;
}

/* ====== Мобильная версия ====== */
.mcf-mobile .mcf-phone-display {
    padding: 16px;
    background: rgba(255,255,255,.18);
    border-radius: 12px;
    font-size: 24px;
    font-weight: 600;
    text-align: center;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.mcf-mobile .mcf-phone-prefix,
.mcf-mobile .mcf-phone-value,
.mcf-mobile .mcf-phone-cursor { color: #fff; }

.mcf-mobile .mcf-virtual-keyboard {
    background: rgba(255,255,255,.10);
    border-radius: 16px;
    padding: 12px;
}
.mcf-mobile .mcf-keyboard-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 10px;
}
.mcf-mobile .mcf-key {
    height: 60px;
    background: #fff;
    border: 0;
    border-radius: 12px;
    font-size: 22px;
    line-height: 1;
    color: #111827;
    box-shadow: 0 2px 6px rgba(0,0,0,.08);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.mcf-mobile .mcf-key span {
    font-size: 10px;
    opacity: .6;
    margin-top: 2px;
}
.mcf-mobile .mcf-key:focus-visible { outline: 3px solid rgba(66,153,225,.6); }

.mcf-mobile .mcf-key-special {
    background: #ff6b6b;
    color: #fff;
}

/* ====== Десктопная версия ====== */
.mcf-desktop .mcf-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.mcf-desktop .mcf-input {
    padding: 16px;
    background: #fff; /* белые поля */
    border: none;
    border-radius: 12px;
    font-size: 16px;
    color: #111827;
    box-shadow: 0 2px 6px rgba(0,0,0,.08);
}
.mcf-desktop .mcf-input:focus-visible {
    outline: 3px solid rgba(59,130,246,.35);
}

/* ====== Кнопка (общая) ====== */
.mcf-submit-button {
    width: 100%;
    padding: 16px;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    border: 0;
    border-radius: 48px;
    cursor: pointer;
    background-size: 200% 200%;
    /* Всегда анимирована — базовый перелив */
    animation: mcfGradientFlow 8s ease infinite;
    transition: transform .2s ease, box-shadow .2s ease;
    margin-top: 12px;
}
.mcf-submit-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(0,0,0,.20);
}
.mcf-submit-button:focus-visible {
    outline: 3px solid rgba(255,255,255,.5);
}

/* Мобайл: зелёные градиенты (никогда не серые) */
.mcf-mobile .mcf-submit-button {
    background-image: linear-gradient(135deg, var(--mcf-accent, #4CAF50), #2E7D32, var(--mcf-accent, #4CAF50));
}

/* Дополнительный пульс когда номер полный — НЕ убирает основной градиент */
.mcf-mobile .mcf-submit-button.mcf-ready {
    animation: mcfGradientFlow 8s ease infinite, mcfPulse 2s ease-in-out infinite;
}

/* Десктоп: контрастный зелёный градиент (плавный, не яркий, выделяется на синем фоне) */
.mcf-desktop .mcf-submit-button {
    background-image: linear-gradient(135deg, #4CAF50, #2E7D32, #4CAF50);
    animation: mcfGradientFlow 10s ease-in-out infinite; /* Медленнее и плавнее */
}

/* ====== Таймер ====== */
.mcf-timer-section { text-align: center; animation: mcfFadeIn .4s ease; }
.mcf-timer-circle {
    width: 160px; height: 160px; background: #fff; border-radius: 50%;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    margin: 18px auto; box-shadow: 0 8px 24px rgba(0,0,0,.15);
}
.mcf-timer-text { font-size: 14px; color: #6b7280; }
.mcf-timer-countdown { font-size: 26px; font-weight: 800; color: #2563eb; }

/* ====== Сообщение директора ====== */
.mcf-director-message { animation: mcfFadeIn .4s ease; }
.mcf-director-card {
    background: #fff; color: #111827;
    border-radius: 16px; padding: 18px;
    box-shadow: 0 8px 24px rgba(0,0,0,.15);
    text-align: center;
}
.mcf-director-icon { font-size: 40px; margin-bottom: 8px; }
.mcf-director-signature { font-style: italic; color: #6b7280; margin-top: 10px; }

/* ====== Уведомления и ошибки ====== */
.mcf-notification {
    position: absolute;
    left: 50%;
    top: -38px;
    transform: translateX(-50%);
    background: #ef4444;
    color: #fff;
    padding: 8px 14px;
    border-radius: 10px;
    box-shadow: 0 6px 18px rgba(0,0,0,.15);
}
.mcf-error { animation: mcfShake .4s ease; outline: 3px solid rgba(239,68,68,.4) !important; }

/* ====== Успех (десктоп) ====== */
.mcf-success-message {
    display: none;
    text-align: center;
    padding: 28px;
    background: #fff;
    color:#111827;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,.20);
    margin: 16px auto;
}
.mcf-success-message.mcf-show { display:block; }
.mcf-success-icon { width: 68px; height: 68px; margin-bottom: 10px; }
.mcf-success-circle { stroke: #10b981; stroke-width: 2; stroke-dasharray: 157; stroke-dashoffset: 157; animation: mcfStroke 1s ease forwards; }
.mcf-success-check { stroke: #10b981; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 50; stroke-dashoffset: 50; animation: mcfStroke .7s .3s ease forwards; }

/* Honeypot (визуально скрыт) */
.mcf-hp {
    position: absolute !important;
    left: -10000px !important;
    width: 1px; height: 1px; opacity: 0;
}

/* ====== Анимации ====== */
@keyframes mcfGradientFlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
@keyframes mcfPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.04); }
    100% { transform: scale(1); }
}
@keyframes mcfShake {
    0%,100% { transform: translateX(0); }
    25% { transform: translateX(-6px); }
    75% { transform: translateX(6px); }
}
@keyframes mcfFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes mcfStroke { to { stroke-dashoffset: 0; } }

/* Предпочтение: уменьшить движение */
@media (prefers-reduced-motion: reduce) {
    .mcf-submit-button { animation: none !important; }
    .mcf-mobile .mcf-submit-button { background-image: linear-gradient(135deg, #4CAF50, #2E7D32); }
}
