.wof-wrapper { 
    display: flex; 
    gap: 20px; 
    max-width: 1000px; 
    margin: 0 auto; 
    align-items: flex-start; 
    flex-wrap: wrap;
    padding: 0 15px;
    box-sizing: border-box;
}
.wof-left { 
    flex: 1; 
    text-align: center; 
    position: relative; 
    min-width: 300px;
}
.wof-right { 
    width: 300px; 
    min-width: 250px;
}
#wof-canvas { 
    border: 6px solid #333; 
    border-radius: 50%; 
    background: #fff; 
    cursor: pointer; 
    display: block; 
    margin: 0 auto; 
    max-width: 100%;
    height: auto;
}
.wof-right h3 { 
    color: #333; 
    margin: 0 0 8px 0; 
}
#wof-editor { 
    width: 100%; 
    font-size: 14px; 
    padding: 8px; 
    resize: vertical; 
    min-height: 120px; 
    border: 1px solid #ccc;
    border-radius: 4px;
    transition: all 0.3s ease;
    white-space: pre-wrap;
    word-wrap: break-word;
    font-family: Arial, sans-serif;
    line-height: 1.4;
    box-sizing: border-box;
}
.wof-controls { 
    margin-top: 10px; 
    display: flex; 
    gap: 10px; 
}
#wof-pointer { 
    position: absolute; 
    top: -30px; 
    left: 50%; 
    transform: translateX(-50%); 
    width: 0; 
    height: 0; 
    border-left: 15px solid transparent; 
    border-right: 15px solid transparent; 
    border-top: 30px solid red; 
    z-index: 20; 
    pointer-events: none; 
}
.wof-editor-btn { 
    display: block; 
    width: 100%; 
    padding: 10px; 
    margin-bottom: 0; 
    background: #333; 
    color: #fff; 
    border: none; 
    cursor: pointer; 
    font-weight: bold; 
    border-radius: 6px; 
    transition: background 0.2s; 
    flex: 1;
    font-size: 14px;
}
.wof-editor-btn:hover { 
    background: #555; 
}
.wof-editor-panel { 
    max-height: 0; 
    overflow: hidden; 
    padding: 0; 
    border: none; 
    border-radius: 6px; 
    transition: max-height 0.4s ease, padding 0.3s ease; 
    background: #f9f9f9; 
}
.wof-editor-panel.active { 
    border: 1px solid #ccc; 
    padding: 10px; 
    max-height: 600px; 
}
/* Блок победителя с фиксированной позицией сверху */
.wof-winner-bar { 
    position: absolute;
    top: calc(100% + 20px); /* Располагается под колесом */
    left: 50%;
    transform: translateX(-50%);
    padding: 8px 12px; 
    font-size: 16px; 
    width: fit-content; 
    max-width: 80%;
    min-width: 200px; 
    border-radius: 6px; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    color: #000;
    background: #fff;
    border: 2px solid #333;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 10;
    word-wrap: break-word;
    white-space: normal;
    text-align: center;
}
.wof-winner-bar span { 
    flex: 1; 
    text-align: center; 
    padding: 0 6px; 
    word-break: break-word; 
    font-weight: bold;
}
/* Стили для кнопок в блоке победителя */
.wof-winner-bar button { 
    background: #fff;
    border: 2px solid #000;
    color: #000; 
    font-size: 16px; 
    cursor: pointer; 
    font-weight: bold; 
    padding: 4px 8px;
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}
.wof-winner-bar button:hover { 
    background: #f0f0f0;
    transform: scale(1.05);
}
.wof-winner-bar button:active {
    transform: scale(0.95);
}
/* Стили для чекбоксов, которые заменяют редактор */
.wof-checkbox-item { 
    display: flex; 
    align-items: center; 
    margin-bottom: 6px; 
    padding: 6px; 
    border-radius: 4px; 
    border: 1px solid #e0e0e0;
    background: #fff;
}
.wof-checkbox-item:hover { 
    background: rgba(0,0,0,0.05); 
}
.wof-checkbox-item input[type="checkbox"] { 
    margin-right: 10px; 
    transform: scale(1.2);
}
.wof-checkbox-item label { 
    flex: 1; 
    cursor: pointer; 
    font-size: 14px;
    padding: 2px 0;
}
.wof-checkbox-item label.checked {
    text-decoration: line-through;
    opacity: 0.6;
    color: #666;
}
.wof-checkboxes-container { 
    max-height: 300px; 
    overflow-y: auto; 
    border: 1px solid #ddd; 
    padding: 10px; 
    border-radius: 4px; 
    background: #fff; 
    display: none;
}
.wof-checkboxes-container.active {
    display: block;
}

/* Кнопка "Свернуть" в редакторе */
.wof-collapse-btn {
    display: none; /* По умолчанию скрыта */
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    background: #666;
    color: #fff;
    border: none;
    cursor: pointer;
    font-weight: bold;
    border-radius: 6px;
    font-size: 16px;
}

.wof-collapse-btn:hover {
    background: #777;
}

/* Фиксированная кнопка редактора для мобильных */
.wof-mobile-toggle {
    display: none;
    position: fixed;
    bottom: 80px; /* Выше гамбургер-меню */
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 300px;
    z-index: 1000;
    background: #333;
    color: #fff;
    border: none;
    padding: 15px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
}

.wof-mobile-toggle:hover {
    background: #555;
}

/* Планшет (768px - 1024px) */
@media (max-width: 1024px) {
    .wof-wrapper {
        flex-direction: column;
        gap: 30px;
        padding: 0 20px;
    }
    .wof-left {
        width: 100%;
        min-width: auto;
    }
    .wof-right {
        width: 100%;
        max-width: 500px;
        margin: 0 auto;
    }
    #wof-canvas {
        max-width: 450px;
    }
    .wof-winner-bar {
        top: calc(100% + 25px);
        font-size: 15px;
        min-width: 220px;
    }
}

/* Мобильные устройства (до 767px) */
@media (max-width: 767px) {
    .wof-wrapper {
        flex-direction: column;
        gap: 25px;
        padding: 0 15px;
        margin-bottom: 80px; /* Отступ для фиксированной кнопки */
    }
    
    .wof-left {
        width: 100%;
        min-width: auto;
        margin-bottom: 20px;
    }
    
    .wof-right {
        width: 100%;
        margin: 0 auto;
    }
    
    /* Скрываем обычную кнопку редактора на мобильных */
    #wof-toggle-editor {
        display: none;
    }
    
    /* Показываем фиксированную кнопку */
    .wof-mobile-toggle {
        display: block;
    }
    
    /* Показываем кнопку "Свернуть" в редакторе на мобильных */
    .wof-collapse-btn {
        display: block;
    }
    
    #wof-canvas {
        max-width: 100%;
        width: 100%;
        height: auto;
        border-width: 4px;
    }
    
    #wof-pointer {
        top: -25px;
        border-left: 12px solid transparent;
        border-right: 12px solid transparent;
        border-top: 25px solid red;
    }
    
    .wof-winner-bar {
        position: relative;
        top: auto;
        left: auto;
        transform: none;
        margin: 15px auto;
        width: 90%;
        max-width: 300px;
        font-size: 14px;
        min-width: 180px;
        padding: 6px 10px;
    }
    
    .wof-winner-bar button {
        width: 28px;
        height: 28px;
        font-size: 14px;
    }
    
    .wof-editor-btn {
        padding: 12px;
        font-size: 16px;
        margin-bottom: 8px;
    }
    
    .wof-controls {
        flex-direction: column;
        gap: 8px;
    }
    
    #wof-editor {
        font-size: 16px;
        min-height: 140px;
    }
    
    .wof-checkbox-item {
        padding: 8px;
    }
    
    .wof-checkbox-item label {
        font-size: 16px;
    }
}

/* Очень маленькие экраны (до 480px) */
@media (max-width: 480px) {
    .wof-wrapper {
        padding: 0 10px;
        gap: 20px;
        margin-bottom: 70px;
    }
    
    #wof-canvas {
        max-width: 100%;
    }
    
    .wof-winner-bar {
        margin: 10px auto;
        width: 95%;
        font-size: 13px;
        min-width: 160px;
        padding: 5px 8px;
    }
    
    .wof-winner-bar button {
        width: 26px;
        height: 26px;
        font-size: 13px;
    }
    
    .wof-right {
        max-width: 100%;
    }
    
    .wof-editor-btn {
        padding: 14px;
        font-size: 15px;
    }
    
    #wof-editor {
        font-size: 15px;
        min-height: 120px;
    }
    
    .wof-mobile-toggle {
        bottom: 70px; /* Выше на очень маленьких экранах */
        padding: 12px;
        font-size: 15px;
    }
}