/* ===== Mix Of Pixel v2.2.0 ===== */
/* Фирменная цветовая схема Mix Of */

:root {
    /* Основные цвета (тёплая палитра) */
    --mop-color-bg-light: #ffffe0;
    --mop-color-bg: #fbfbc8;
    --mop-color-text: #381400;
    --mop-color-primary: #664735;
    --mop-color-primary-rgb: 102, 71, 53;
    
    /* Дополнительные цвета */
    --mop-color-border: rgba(102, 71, 53, 0.2);
    --mop-color-border-hover: #664735;
    --mop-color-shadow: rgba(56, 20, 0, 0.15);
    --mop-color-shadow-primary: rgba(102, 71, 53, 0.4);
    --mop-color-white: #ffffe0;
    --mop-color-dark: #381400;
    
    /* Градиенты */
    --mop-gradient-main: linear-gradient(145deg, var(--mop-color-bg-light) 0%, var(--mop-color-bg) 100%);
    --mop-gradient-primary: linear-gradient(135deg, var(--mop-color-primary) 0%, var(--mop-color-dark) 100%);
    --mop-gradient-top-line: linear-gradient(90deg, var(--mop-color-primary), var(--mop-color-dark), var(--mop-color-primary));
    --mop-gradient-header-bg: linear-gradient(161deg, #d0c79a 0%, #a39c7b 100%);
    
    /* Размеры и отступы */
    --mop-radius: 16px;
    --mop-radius-sm: 8px;
    --mop-shadow: 0 20px 60px var(--mop-color-shadow);
    --mop-shadow-sm: 0 4px 12px rgba(102, 71, 53, 0.15);
    --mop-shadow-primary: 0 4px 15px rgba(102, 71, 53, 0.3);
    
    /* Шрифты */
    --mop-font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --mop-font-family-mono: 'SF Mono', Monaco, 'Courier New', monospace;
    
    /* Анимации */
    --mop-transition: 0.2s ease;
    --mop-transition-slow: 0.3s ease;
}

.mop-widget {
    --mop-bg: #1a1a1a;
    --mop-panel-bg: rgba(0, 0, 0, 0.85);
    --mop-text: #ffffff;
    --mop-text-muted: #a0a0c0;
    --mop-border: rgba(255, 255, 255, 0.1);
    --mop-accent: #6a11cb;
    --mop-accent-2: #2575fc;
    --mop-danger: #ff416c;
    --mop-radius: 16px;
    --mop-radius-sm: 8px;
    --mop-z-index: 2147483647;
    font-family: var(--mop-font-family);
}

.mop-widget,
.mop-widget *,
.mop-widget *::before,
.mop-widget *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    border: 0;
    outline: 0;
    text-decoration: none;
    list-style: none;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===== АНИМИРОВАННАЯ ПОЛОСА СВЕРХУ ===== */
.mop-widget .mop-top-line {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 15px;
    background: var(--mop-gradient-top-line);
    background-size: 200% 100%;
    animation: mopGradientShift 3s linear infinite;
    border-radius: var(--mop-radius) var(--mop-radius) 0 0;
    overflow: hidden;
}

@keyframes mopGradientShift {
    0% {
        background-position: 0% 50%;
    }
    100% {
        background-position: 200% 50%;
    }
}

/* Отключаем анимацию для пользователей с предпочтением уменьшения движения */
@media (prefers-reduced-motion: reduce) {
    .mop-widget .mop-top-line {
        animation: none;
    }
}

/* ===== СТАРТОВАЯ КАРТОЧКА ===== */
.mop-widget .mop-landing {
    width: 100%;
    padding: 20px 0;
}

.mop-widget .mop-landing-card {
    max-width: 720px;
    margin: 0 auto;
    background: var(--mop-gradient-main);
    border: 1px solid var(--mop-color-border);
    border-radius: var(--mop-radius);
    padding: 40px;
    box-shadow: var(--mop-shadow);
    position: relative;
    overflow: hidden;
    color: var(--mop-color-text);
}

.mop-widget .mop-landing-header {
    text-align: center;
    margin-bottom: 30px;
}

.mop-widget .mop-landing-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: var(--mop-gradient-primary);
    border-radius: var(--mop-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--mop-shadow-primary);
}

.mop-widget .mop-landing-icon::before {
    content: '';
    width: 40px;
    height: 40px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ffffe0'%3E%3Cpath d='M21 3H3c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h5v2h8v-2h5c1.1 0 1.99-.9 1.99-2L23 5c0-1.1-.9-2-2-2zm0 14H3V5h18v12z'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
}

.mop-widget .mop-landing-title {
    color: var(--mop-color-dark);
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.mop-widget .mop-landing-subtitle {
    color: var(--mop-color-primary);
    font-size: 16px;
}

/* Секции */
.mop-widget .mop-section {
    margin-bottom: 28px;
    padding-bottom: 28px;
    border-bottom: 1px solid var(--mop-color-border);
}

.mop-widget .mop-section:last-of-type {
    border-bottom: none;
    margin-bottom: 20px;
    padding-bottom: 0;
}

.mop-widget .mop-section-title {
    color: var(--mop-color-dark);
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.mop-widget .mop-section-title::before {
    content: '';
    width: 4px;
    height: 20px;
    background: var(--mop-gradient-primary);
    border-radius: 2px;
}

/* Список преимуществ */
.mop-widget .mop-features-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mop-widget .mop-features-list li {
    color: var(--mop-color-text);
    font-size: 14px;
    line-height: 1.5;
    padding-left: 24px;
    position: relative;
}

.mop-widget .mop-features-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 6px;
    width: 12px;
    height: 12px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23664735'%3E%3Cpath d='M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
}

.mop-widget .mop-features-list li strong {
    color: var(--mop-color-dark);
    font-weight: 600;
}

/* Инструкция — шаги */
.mop-widget .mop-instruction {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.mop-widget .mop-instruction-step {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.mop-widget .mop-step-number {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    background: var(--mop-gradient-primary);
    color: var(--mop-color-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
}

.mop-widget .mop-step-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding-top: 4px;
}

.mop-widget .mop-step-content strong {
    color: var(--mop-color-dark);
    font-size: 14px;
    font-weight: 600;
}

.mop-widget .mop-step-content span {
    color: var(--mop-color-text);
    font-size: 13px;
    line-height: 1.4;
}

/* Управление */
.mop-widget .mop-controls-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.mop-widget .mop-control-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mop-widget .mop-control-label {
    color: var(--mop-color-dark);
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mop-widget .mop-control-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mop-widget .mop-control-list li {
    color: var(--mop-color-text);
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.mop-widget kbd,
.mop-widget .mop-gesture {
    background: rgba(102, 71, 53, 0.1);
    color: var(--mop-color-primary);
    padding: 3px 8px;
    border-radius: 4px;
    font-family: var(--mop-font-family-mono);
    font-size: 12px;
    font-weight: 600;
    border: 1px solid var(--mop-color-border);
    min-width: 60px;
    text-align: center;
}

/* Кнопка запуска */
.mop-widget .mop-btn-start {
    width: 100%;
    background: var(--mop-gradient-primary);
    color: var(--mop-color-white);
    border: none;
    padding: 16px 32px;
    border-radius: var(--mop-radius-sm);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform var(--mop-transition), box-shadow var(--mop-transition);
    font-family: inherit;
    letter-spacing: 0.3px;
    box-shadow: var(--mop-shadow-primary);
}

.mop-widget .mop-btn-start:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 71, 53, 0.4);
}

.mop-widget .mop-btn-start:active {
    transform: translateY(0);
}

/* ===== РАБОЧЕЕ ПРОСТРАНСТВО ===== */
.mop-widget .mop-workspace {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: var(--mop-bg);
    z-index: var(--mop-z-index);
    overflow: hidden;
    transition: background-color 0.2s ease;
}

/* Кнопка закрытия */
.mop-widget .mop-close-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    background: rgba(0, 0, 0, 0.19);
    border: 1px solid rgba(255, 255, 255, 0.504);
    border-radius: 50%;
    cursor: pointer;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s, background 0.2s;
}

.mop-widget .mop-close-btn:hover {
    transform: scale(1.1) rotate(90deg);
    background: var(--mop-color-danger);
}

.mop-widget .mop-close-icon {
    width: 16px;
    height: 16px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
}

/* Панель управления */
.mop-widget .mop-panel {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--mop-panel-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 20px 30px;
    border-radius: var(--mop-radius);
    border: 1px solid var(--mop-border);
    text-align: center;
    transition: opacity 0.3s ease, transform 0.3s ease;
    max-width: 90vw;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.mop-widget.mop-fullscreen-active .mop-panel {
    opacity: 0;
    pointer-events: none;
    transform: translateX(-50%) translateY(30px);
}

.mop-widget.mop-fullscreen-active.mop-show-panel .mop-panel {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}

.mop-widget .mop-panel-title {
    color: var(--mop-text);
    font-size: 18px;
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 15px;
}

/* Сетка цветов */
.mop-widget .mop-colors-grid {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

.mop-widget .mop-color-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    display: inline-block;
    flex-shrink: 0;
}

.mop-widget .mop-color-btn:hover,
.mop-widget .mop-color-btn.mop-active {
    transform: scale(1.2);
    border-color: #ffffff;
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.6);
}

/* Кнопки действий */
.mop-widget .mop-actions-row {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.mop-widget .mop-action-btn {
    background: var(--mop-gradient-primary);
    color: var(--mop-color-white);
    border: none;
    padding: 10px 20px;
    border-radius: var(--mop-radius-sm);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: transform var(--mop-transition), box-shadow var(--mop-transition);
    font-family: inherit;
    line-height: 1.4;
    box-shadow: var(--mop-shadow-primary);
}

.mop-widget .mop-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 71, 53, 0.4);
}

.mop-widget .mop-btn-exit {
    background: linear-gradient(90deg, #ff416c 0%, #ff4b2b 100%);
}

.mop-widget .mop-btn-exit:hover {
    box-shadow: 0 5px 15px rgba(255, 65, 108, 0.4);
}

/* Подсказки */
.mop-widget .mop-hints-row {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    font-size: 11px;
    color: var(--mop-text-muted);
    line-height: 1.4;
}

.mop-widget .mop-mobile-hints {
    display: none;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    font-size: 12px;
    color: var(--mop-text-muted);
    margin-top: 10px;
}

/* Зона активации */
.mop-widget .mop-activation-zone {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100px;
    z-index: 1;
    display: none;
}

.mop-widget.mop-fullscreen-active .mop-activation-zone {
    display: block;
}

/* Подсказка в fullscreen */
.mop-widget .mop-fullscreen-hint {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #fff;
    padding: 24px 32px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 14px;
    text-align: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
    z-index: 10;
    max-width: 80%;
}

.mop-widget .mop-fullscreen-hint.mop-hint-visible {
    opacity: 1;
}

.mop-widget .mop-hint-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 12px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%2300ffcc'%3E%3Cpath d='M13 1.07V9h7c0-4.08-3.05-7.44-7-7.93zM4 15c0 4.42 3.58 8 8 8s8-3.58 8-8v-4H4v4zm7-13.93C7.05 1.56 4 4.92 4 9h7V1.07z'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
}

.mop-widget .mop-hint-text {
    display: block;
    margin-bottom: 6px;
    color: #fff;
    font-size: 15px;
    font-weight: 500;
}

.mop-widget .mop-hint-subtext {
    display: block;
    font-size: 12px;
    color: #a0a0c0;
}

/* ===== АДАПТИВНОСТЬ ===== */
@media (max-width: 768px) {
    .mop-widget .mop-landing-card {
        padding: 28px 20px;
    }
    
    .mop-widget .mop-landing-title {
        font-size: 26px;
    }
    
    .mop-widget .mop-landing-subtitle {
        font-size: 14px;
    }
    
    .mop-widget .mop-landing-icon {
        width: 64px;
        height: 64px;
    }
    
    .mop-widget .mop-landing-icon::before {
        width: 32px;
        height: 32px;
    }
    
    .mop-widget .mop-controls-info {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .mop-widget .mop-color-btn {
        width: 50px;
        height: 50px;
        border-width: 3px;
    }
    
    .mop-widget .mop-panel {
        bottom: 20px;
        padding: 15px 20px;
        max-width: 95vw;
    }
    
    .mop-widget .mop-hints-row {
        display: none;
    }
    
    .mop-widget .mop-mobile-hints {
        display: flex;
    }
    
    .mop-widget .mop-activation-zone {
        height: 150px;
    }
    
    .mop-widget .mop-close-btn {
        top: 15px;
        right: 15px;
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 480px) {
    .mop-widget .mop-landing-card {
        padding: 24px 16px;
    }
    
    .mop-widget .mop-landing-title {
        font-size: 22px;
    }
    
    .mop-widget .mop-section-title {
        font-size: 16px;
    }
    
    .mop-widget .mop-features-list li,
    .mop-widget .mop-step-content strong,
    .mop-widget .mop-control-list li {
        font-size: 13px;
    }
}